n2paxos

package
v0.0.0-...-3e9ff4f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NORMAL = iota
	RECOVERING
)

status

View Source
const (
	START = iota
	COMMIT
)

phase

View Source
const HISTORY_SIZE = 10010001

Variables

View Source
var MaxDescRoutines = 100

Functions

This section is empty.

Types

type Batcher

type Batcher struct {
	// contains filtered or unexported fields
}

func NewBatcher

func NewBatcher(r *Replica, size int) *Batcher

func (*Batcher) Send2A

func (b *Batcher) Send2A(twoA *M2A)

func (*Batcher) Send2AClient

func (b *Batcher) Send2AClient(twoA *M2A, cid int32)

func (*Batcher) Send2B

func (b *Batcher) Send2B(twoB *M2B)

func (*Batcher) Send2BClient

func (b *Batcher) Send2BClient(twoB *M2B, cid int32)

type BatcherOp

type BatcherOp struct {
	// contains filtered or unexported fields
}

type CommandId

type CommandId struct {
	ClientId int32
	SeqNum   int32
}

func (*CommandId) BinarySize

func (t *CommandId) BinarySize() (nbytes int, sizeKnown bool)

func (*CommandId) Marshal

func (t *CommandId) Marshal(wire io.Writer)

func (CommandId) String

func (cmdId CommandId) String() string

func (*CommandId) Unmarshal

func (t *CommandId) Unmarshal(wire io.Reader) error

type CommandIdCache

type CommandIdCache struct {
	// contains filtered or unexported fields
}

func NewCommandIdCache

func NewCommandIdCache() *CommandIdCache

func (*CommandIdCache) Get

func (p *CommandIdCache) Get() *CommandId

func (*CommandIdCache) Put

func (p *CommandIdCache) Put(t *CommandId)

type CommunicationSupply

type CommunicationSupply struct {
	// contains filtered or unexported fields
}

type M1A

type M1A struct {
	Replica int32
	Ballot  int32
}

func (*M1A) BinarySize

func (t *M1A) BinarySize() (nbytes int, sizeKnown bool)

func (*M1A) Marshal

func (t *M1A) Marshal(wire io.Writer)

func (*M1A) New

func (m *M1A) New() fastrpc.Serializable

func (*M1A) Unmarshal

func (t *M1A) Unmarshal(wire io.Reader) error

type M1ACache

type M1ACache struct {
	// contains filtered or unexported fields
}

func NewM1ACache

func NewM1ACache() *M1ACache

func (*M1ACache) Get

func (p *M1ACache) Get() *M1A

func (*M1ACache) Put

func (p *M1ACache) Put(t *M1A)

type M1B

type M1B struct {
	Replica int32
	Ballot  int32
	CBallot int32
	Cmds    []state.Command
}

func (*M1B) BinarySize

func (t *M1B) BinarySize() (nbytes int, sizeKnown bool)

func (*M1B) Marshal

func (t *M1B) Marshal(wire io.Writer)

func (*M1B) New

func (m *M1B) New() fastrpc.Serializable

func (*M1B) Unmarshal

func (t *M1B) Unmarshal(rr io.Reader) error

type M1BCache

type M1BCache struct {
	// contains filtered or unexported fields
}

func NewM1BCache

func NewM1BCache() *M1BCache

func (*M1BCache) Get

func (p *M1BCache) Get() *M1B

func (*M1BCache) Put

func (p *M1BCache) Put(t *M1B)

type M2A

type M2A struct {
	Replica int32
	Ballot  int32
	Cmd     state.Command
	CmdId   CommandId
	CmdSlot int
}

func (*M2A) BinarySize

func (t *M2A) BinarySize() (nbytes int, sizeKnown bool)

func (*M2A) Marshal

func (t *M2A) Marshal(wire io.Writer)

func (*M2A) New

func (m *M2A) New() fastrpc.Serializable

func (*M2A) Unmarshal

func (t *M2A) Unmarshal(wire io.Reader) error

type M2ACache

type M2ACache struct {
	// contains filtered or unexported fields
}

func NewM2ACache

func NewM2ACache() *M2ACache

func (*M2ACache) Get

func (p *M2ACache) Get() *M2A

func (*M2ACache) Put

func (p *M2ACache) Put(t *M2A)

type M2B

type M2B struct {
	Replica int32
	Ballot  int32
	CmdSlot int
}

func (*M2B) BinarySize

func (t *M2B) BinarySize() (nbytes int, sizeKnown bool)

func (*M2B) Marshal

func (t *M2B) Marshal(wire io.Writer)

func (*M2B) New

func (m *M2B) New() fastrpc.Serializable

func (*M2B) Unmarshal

func (t *M2B) Unmarshal(wire io.Reader) error

type M2BCache

type M2BCache struct {
	// contains filtered or unexported fields
}

func NewM2BCache

func NewM2BCache() *M2BCache

func (*M2BCache) Get

func (p *M2BCache) Get() *M2B

func (*M2BCache) Put

func (p *M2BCache) Put(t *M2B)

type M2s

type M2s struct {
	TwoAs []M2A
	TwoBs []M2B
}

func (*M2s) BinarySize

func (t *M2s) BinarySize() (nbytes int, sizeKnown bool)

func (*M2s) Marshal

func (t *M2s) Marshal(wire io.Writer)

func (*M2s) New

func (m *M2s) New() fastrpc.Serializable

func (*M2s) Unmarshal

func (t *M2s) Unmarshal(rr io.Reader) error

type M2sCache

type M2sCache struct {
	// contains filtered or unexported fields
}

func NewM2sCache

func NewM2sCache() *M2sCache

func (*M2sCache) Get

func (p *M2sCache) Get() *M2s

func (*M2sCache) Put

func (p *M2sCache) Put(t *M2s)

type MPaxosSync

type MPaxosSync struct {
	Replica int32
	Ballot  int32
	Cmds    []state.Command
}

func (*MPaxosSync) BinarySize

func (t *MPaxosSync) BinarySize() (nbytes int, sizeKnown bool)

func (*MPaxosSync) Marshal

func (t *MPaxosSync) Marshal(wire io.Writer)

func (*MPaxosSync) New

func (m *MPaxosSync) New() fastrpc.Serializable

func (*MPaxosSync) Unmarshal

func (t *MPaxosSync) Unmarshal(rr io.Reader) error

type MPaxosSyncCache

type MPaxosSyncCache struct {
	// contains filtered or unexported fields
}

func NewMPaxosSyncCache

func NewMPaxosSyncCache() *MPaxosSyncCache

func (*MPaxosSyncCache) Get

func (p *MPaxosSyncCache) Get() *MPaxosSync

func (*MPaxosSyncCache) Put

func (p *MPaxosSyncCache) Put(t *MPaxosSync)

type Replica

type Replica struct {
	*replica.Replica

	AQ replica.QuorumI
	// contains filtered or unexported fields
}

func New

func New(alias string, rid int, addrs []string, exec bool, pl, f int,
	conf *config.Config, logger *dlog.Logger) *Replica

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL