Documentation ¶
Index ¶
- Constants
- Variables
- func ImmigrationTxnFromCap(exe *dispatcher.Executor, vd *VarDispatcher, stateChange TxnLocalStateChange, ...)
- func NewFrame(parent *frame, v *Var, txnId *common.TxnId, txnActions *TxnActions, ...) *frame
- type Ballot
- type BallotBuilder
- type LocalConnection
- type Poisson
- type TopologyChangeSubscriberType
- type TopologyPublisher
- type TopologySubscriber
- type TranslationCallback
- type Txn
- type TxnActions
- type TxnLocalStateChange
- type TxnReader
- type Var
- func (v *Var) AddWriteSubscriber(txnId *common.TxnId, sub *VarWriteSubscriber)
- func (v *Var) ReceiveTxn(action *localAction)
- func (v *Var) ReceiveTxnOutcome(action *localAction)
- func (v *Var) RemoveWriteSubscriber(txnId *common.TxnId)
- func (v *Var) SetCurFrame(f *frame, action *localAction, positions *common.Positions)
- func (v *Var) Status(sc *server.StatusConsumer)
- func (v *Var) TxnGloballyComplete(action *localAction)
- type VarDispatcher
- type VarManager
- func (vm *VarManager) ApplyToVar(fun func(*Var), createIfMissing bool, uuid *common.VarUUId)
- func (vm *VarManager) ScheduleCallback(interval time.Duration, fun tw.Event)
- func (vm *VarManager) SetInactive(v *Var)
- func (vm *VarManager) Status(sc *server.StatusConsumer)
- func (vm *VarManager) TopologyChanged(topology *configuration.Topology, done func(bool))
- type VarWriteSubscriber
- type VectorClock
- func (vc *VectorClock) AsData() []byte
- func (vc *VectorClock) AsMutable() *VectorClockMutable
- func (vc *VectorClock) At(vUUId *common.VarUUId) uint64
- func (vc *VectorClock) ForEach(it func(*common.VarUUId, uint64) bool) bool
- func (vc *VectorClock) Len() int
- func (vcA *VectorClock) LessThan(vcB VectorClockInterface) bool
- func (vc *VectorClock) String() string
- type VectorClockInterface
- type VectorClockMutable
- func (vc *VectorClockMutable) AsData() []byte
- func (vc *VectorClockMutable) AsMutable() *VectorClockMutable
- func (vc *VectorClockMutable) At(vUUId *common.VarUUId) uint64
- func (vc *VectorClockMutable) Bump(vUUId *common.VarUUId, inc uint64) *VectorClockMutable
- func (vcA *VectorClockMutable) Clone() *VectorClockMutable
- func (vc *VectorClockMutable) Delete(vUUId *common.VarUUId) *VectorClockMutable
- func (vc *VectorClockMutable) DeleteIfMatch(vUUId *common.VarUUId, v uint64) bool
- func (vc *VectorClockMutable) ForEach(it func(*common.VarUUId, uint64) bool) bool
- func (vc *VectorClockMutable) Len() int
- func (vcA *VectorClockMutable) LessThan(vcB VectorClockInterface) bool
- func (vcA *VectorClockMutable) MergeInMax(vcB VectorClockInterface) bool
- func (vcA *VectorClockMutable) MergeInMissing(vcB VectorClockInterface) bool
- func (vc *VectorClockMutable) SetVarIdMax(vUUId *common.VarUUId, v uint64) bool
- func (vc *VectorClockMutable) String() string
- type Vote
Constants ¶
View Source
const ( Commit = Vote(msgs.VOTE_COMMIT) AbortBadRead = Vote(msgs.VOTE_ABORTBADREAD) AbortDeadlock = Vote(msgs.VOTE_ABORTDEADLOCK) )
View Source
const ( VarSubscriber TopologyChangeSubscriberType = iota ProposerSubscriber TopologyChangeSubscriberType = iota AcceptorSubscriber TopologyChangeSubscriberType = iota ConnectionSubscriber TopologyChangeSubscriberType = iota ConnectionManagerSubscriber TopologyChangeSubscriberType = iota EmigratorSubscriber TopologyChangeSubscriberType = iota TopologyChangeSubscriberTypeLimit int = iota )
Variables ¶
View Source
var AbortRollNotFirst = errors.New("AbortRollNotFirst")
View Source
var AbortRollNotInPermutation = errors.New("AbortRollNotInPermutation")
Functions ¶
func ImmigrationTxnFromCap ¶
func ImmigrationTxnFromCap(exe *dispatcher.Executor, vd *VarDispatcher, stateChange TxnLocalStateChange, ourRMId common.RMId, reader *TxnReader, varCaps *msgs.Var_List)
func NewFrame ¶
func NewFrame(parent *frame, v *Var, txnId *common.TxnId, txnActions *TxnActions, txnClock, writesClock *VectorClockMutable) *frame
Types ¶
type Ballot ¶
type Ballot struct { VarUUId *common.VarUUId Data []byte VoteCap *msgs.Vote Clock *VectorClock Vote Vote }
func BallotFromData ¶
type BallotBuilder ¶
type BallotBuilder struct { *Ballot Clock *VectorClockMutable }
func NewBallotBuilder ¶
func NewBallotBuilder(vUUId *common.VarUUId, vote Vote, clock *VectorClockMutable) *BallotBuilder
func (*BallotBuilder) CreateBadReadBallot ¶
func (ballot *BallotBuilder) CreateBadReadBallot(txnId *common.TxnId, actions *TxnActions) *Ballot
func (*BallotBuilder) ToBallot ¶
func (ballot *BallotBuilder) ToBallot() *Ballot
type LocalConnection ¶
type Poisson ¶
type Poisson struct {
// contains filtered or unexported fields
}
func NewPoisson ¶
func NewPoisson() *Poisson
type TopologyChangeSubscriberType ¶
type TopologyChangeSubscriberType uint8
type TopologyPublisher ¶
type TopologyPublisher interface { AddTopologySubscriber(TopologyChangeSubscriberType, TopologySubscriber) *configuration.Topology RemoveTopologySubscriberAsync(TopologyChangeSubscriberType, TopologySubscriber) }
type TopologySubscriber ¶
type TopologySubscriber interface {
TopologyChanged(*configuration.Topology, func(bool))
}
type TranslationCallback ¶
type Txn ¶
type Txn struct { Id *common.TxnId Retry bool TxnReader *TxnReader // contains filtered or unexported fields }
func TxnFromReader ¶
func TxnFromReader(exe *dispatcher.Executor, vd *VarDispatcher, stateChange TxnLocalStateChange, ourRMId common.RMId, reader *TxnReader) *Txn
func (*Txn) BallotOutcomeReceived ¶
Callback (from network/paxos)
func (*Txn) LocallyComplete ¶
func (talc *Txn) LocallyComplete()
Callback (from var-dispatcher (frames) back into txn)
func (*Txn) Status ¶
func (txn *Txn) Status(sc *server.StatusConsumer)
type TxnActions ¶
type TxnActions struct { Data []byte // contains filtered or unexported fields }
func TxnActionsFromData ¶
func TxnActionsFromData(data []byte, forceDecode bool) *TxnActions
func (*TxnActions) Actions ¶
func (actions *TxnActions) Actions() *msgs.Action_List
func (*TxnActions) AsDeflated ¶
func (actions *TxnActions) AsDeflated() *TxnActions
type TxnLocalStateChange ¶
type TxnReader ¶
type TxnReader struct { Id *common.TxnId Data []byte Txn msgs.Txn // contains filtered or unexported fields }
func TxnReaderFromData ¶
func (*TxnReader) Actions ¶
func (tr *TxnReader) Actions(forceDecode bool) *TxnActions
func (*TxnReader) AsDeflated ¶
func (*TxnReader) IsDeflated ¶
type Var ¶
func NewVar ¶
func NewVar(uuid *common.VarUUId, exe *dispatcher.Executor, db *db.Databases, vm *VarManager) *Var
func VarFromData ¶
func VarFromData(data []byte, exe *dispatcher.Executor, db *db.Databases, vm *VarManager) (*Var, error)
func (*Var) AddWriteSubscriber ¶
func (v *Var) AddWriteSubscriber(txnId *common.TxnId, sub *VarWriteSubscriber)
func (*Var) ReceiveTxn ¶
func (v *Var) ReceiveTxn(action *localAction)
func (*Var) ReceiveTxnOutcome ¶
func (v *Var) ReceiveTxnOutcome(action *localAction)
func (*Var) RemoveWriteSubscriber ¶
func (*Var) SetCurFrame ¶
func (*Var) Status ¶
func (v *Var) Status(sc *server.StatusConsumer)
func (*Var) TxnGloballyComplete ¶
func (v *Var) TxnGloballyComplete(action *localAction)
type VarDispatcher ¶
type VarDispatcher struct { dispatcher.Dispatcher // contains filtered or unexported fields }
func NewVarDispatcher ¶
func NewVarDispatcher(count uint8, rmId common.RMId, cm TopologyPublisher, db *db.Databases, lc LocalConnection) *VarDispatcher
func (*VarDispatcher) ApplyToVar ¶
func (vd *VarDispatcher) ApplyToVar(fun func(*Var), createIfMissing bool, vUUId *common.VarUUId)
func (*VarDispatcher) Status ¶
func (vd *VarDispatcher) Status(sc *server.StatusConsumer)
type VarManager ¶
type VarManager struct { LocalConnection Topology *configuration.Topology RMId common.RMId RollAllowed bool // contains filtered or unexported fields }
func NewVarManager ¶
func NewVarManager(exe *dispatcher.Executor, rmId common.RMId, tp TopologyPublisher, db *db.Databases, lc LocalConnection) *VarManager
func (*VarManager) ApplyToVar ¶
func (vm *VarManager) ApplyToVar(fun func(*Var), createIfMissing bool, uuid *common.VarUUId)
func (*VarManager) ScheduleCallback ¶
func (vm *VarManager) ScheduleCallback(interval time.Duration, fun tw.Event)
func (*VarManager) SetInactive ¶
func (vm *VarManager) SetInactive(v *Var)
var.VarLifecycle interface
func (*VarManager) Status ¶
func (vm *VarManager) Status(sc *server.StatusConsumer)
func (*VarManager) TopologyChanged ¶
func (vm *VarManager) TopologyChanged(topology *configuration.Topology, done func(bool))
type VarWriteSubscriber ¶
type VectorClock ¶
type VectorClock struct {
// contains filtered or unexported fields
}
func NewVectorClock ¶
func NewVectorClock() *VectorClock
func VectorClockFromData ¶
func VectorClockFromData(vcData []byte, forceDecode bool) *VectorClock
func (*VectorClock) AsData ¶
func (vc *VectorClock) AsData() []byte
func (*VectorClock) AsMutable ¶
func (vc *VectorClock) AsMutable() *VectorClockMutable
func (*VectorClock) Len ¶
func (vc *VectorClock) Len() int
func (*VectorClock) LessThan ¶
func (vcA *VectorClock) LessThan(vcB VectorClockInterface) bool
func (*VectorClock) String ¶
func (vc *VectorClock) String() string
type VectorClockInterface ¶
type VectorClockMutable ¶
type VectorClockMutable struct { *VectorClock // contains filtered or unexported fields }
func (*VectorClockMutable) AsData ¶
func (vc *VectorClockMutable) AsData() []byte
func (*VectorClockMutable) AsMutable ¶
func (vc *VectorClockMutable) AsMutable() *VectorClockMutable
func (*VectorClockMutable) Bump ¶
func (vc *VectorClockMutable) Bump(vUUId *common.VarUUId, inc uint64) *VectorClockMutable
func (*VectorClockMutable) Clone ¶
func (vcA *VectorClockMutable) Clone() *VectorClockMutable
func (*VectorClockMutable) Delete ¶
func (vc *VectorClockMutable) Delete(vUUId *common.VarUUId) *VectorClockMutable
func (*VectorClockMutable) DeleteIfMatch ¶
func (vc *VectorClockMutable) DeleteIfMatch(vUUId *common.VarUUId, v uint64) bool
func (*VectorClockMutable) Len ¶
func (vc *VectorClockMutable) Len() int
func (*VectorClockMutable) LessThan ¶
func (vcA *VectorClockMutable) LessThan(vcB VectorClockInterface) bool
func (*VectorClockMutable) MergeInMax ¶
func (vcA *VectorClockMutable) MergeInMax(vcB VectorClockInterface) bool
func (*VectorClockMutable) MergeInMissing ¶
func (vcA *VectorClockMutable) MergeInMissing(vcB VectorClockInterface) bool
func (*VectorClockMutable) SetVarIdMax ¶
func (vc *VectorClockMutable) SetVarIdMax(vUUId *common.VarUUId, v uint64) bool
func (*VectorClockMutable) String ¶
func (vc *VectorClockMutable) String() string
Click to show internal directories.
Click to hide internal directories.