Documentation ¶
Index ¶
- type Instance
- type InstanceInfo
- type PackedInstance
- type PackedRecoveryInfo
- type PackedReplica
- type Param
- type RecoveryInfo
- type Replica
- func (r *Replica) F() int
- func (r *Replica) IsCheckpoint(n uint64) bool
- func (r *Replica) Pack() *PackedReplica
- func (r *Replica) Propose(cmds ...message.Command) chan uint64
- func (r *Replica) RecoverFromPersistent() error
- func (r *Replica) RestoreReplica() error
- func (r *Replica) RestoreSingleInstance(rowId uint8, instanceId uint64) (*Instance, error)
- func (r *Replica) Start() error
- func (r *Replica) Stop()
- func (r *Replica) StoreInstances(insts ...*Instance) error
- func (r *Replica) StoreReplica() error
- func (r *Replica) StoreSingleInstance(inst *Instance) error
- func (r *Replica) Unpack(p *PackedReplica)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instance ¶
type Instance struct { CommittedNotify chan struct{} ExecutedNotify chan struct{} // contains filtered or unexported fields }
func (*Instance) Dependencies ¶
func (i *Instance) Dependencies() message.Dependencies
func (*Instance) Pack ¶
func (i *Instance) Pack() *PackedInstance
func (*Instance) SetExecuted ¶
func (i *Instance) SetExecuted()
func (*Instance) StatusString ¶
func (*Instance) Unpack ¶
func (i *Instance) Unpack(p *PackedInstance)
type InstanceInfo ¶
type InstanceInfo struct {
// contains filtered or unexported fields
}
bookkeeping struct for recording counts of different messages and some flags
func NewInstanceInfo ¶
func NewInstanceInfo() *InstanceInfo
type PackedInstance ¶
type PackedInstance struct { Cmds message.Commands Deps message.Dependencies Status uint8 Ballot *message.Ballot RowId uint8 Id uint64 Executed bool PackedRecoveryInfo *PackedRecoveryInfo }
This is for marshal/unmarshaling the instance
type PackedRecoveryInfo ¶
type PackedReplica ¶
type Param ¶
type Param struct { ReplicaId uint8 Size uint8 StateMachine epaxos.StateMachine CheckpointCycle uint64 BatchInterval time.Duration TimeoutInterval time.Duration ExecuteInterval time.Duration Addrs []string Transporter epaxos.Transporter EnableBatching bool EnablePersistent bool Restore bool PersistentPath string }
type RecoveryInfo ¶
type RecoveryInfo struct {
// contains filtered or unexported fields
}
recovery info will keep information of the instance info that we will send out on the next stage.
func NewRecoveryInfo ¶
func NewRecoveryInfo() *RecoveryInfo
type Replica ¶
type Replica struct { Id uint8 Size uint8 MaxInstanceNum []uint64 // the highest instance number seen for each replica ProposeNum uint64 ProposeChan chan *proposeRequest BatchInterval time.Duration TimeoutInterval time.Duration CheckpointCycle uint64 ExecutedUpTo []uint64 InstanceMatrix [][]*Instance StateMachine epaxos.StateMachine Epoch uint32 MessageChan chan message.Message Addrs []string Transporter epaxos.Transporter // contains filtered or unexported fields }
func (*Replica) IsCheckpoint ¶
func (*Replica) RecoverFromPersistent ¶
recover from persistent storage
func (*Replica) RestoreReplica ¶
func (*Replica) RestoreSingleInstance ¶
func (*Replica) StoreInstances ¶
func (*Replica) StoreSingleInstance ¶
store and restore the instance
func (*Replica) Unpack ¶
func (r *Replica) Unpack(p *PackedReplica)
Click to show internal directories.
Click to hide internal directories.