parallel

package
v0.0.0-...-cccf8dc Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2016 License: GPL-3.0, GPL-3.0-only Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAvailableMajorityCallback

func NewAvailableMajorityCallback(majRequired ...*gsim.GraphNode) *majorityCallback

func NewHistoryNodes

func NewHistoryNodes() *historyNodes

func NewInhibitMajorityCallback

func NewInhibitMajorityCallback(majRequired ...*gsim.GraphNode) *majorityCallback

Types

type Ballot

type Ballot interface {
	IsAbort() bool
	IsStable() bool
	AllVotesReceived() bool
	AllLocallyComplete() bool
}

type EngineVar

type EngineVar interface {
	TxnReceived(*p.Txn, Ballot) error
	TxnVotesReceived(*p.Txn, Ballot) error
	TxnGloballyCompleteReceived(*p.Txn, Ballot) error
	CommitHistory() *p.HistoryNode
}

type Histogram

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

func NewHistogram

func NewHistogram(cc chan []*Histogram, rng *rand.Rand) *Histogram

func ValidateAllHistories

func ValidateAllHistories(engine TxnEngine, txns []*p.Txn, vis []*VarInstance, snm StartingNodeModifier, majorityVoting bool, serialHistories []*p.HistoryNode) *Histogram

func ValidateHistory

func ValidateHistory(engine TxnEngine, txns []*p.Txn, vis []*VarInstance, snm StartingNodeModifier, majorityVoting bool, serialHistories []*p.HistoryNode, num *big.Int) *Histogram

func (*Histogram) Add

func (h *Histogram) Add(commitCount, abortCount int, isPrefix bool, instr txnInstruction)

func (*Histogram) Clone

func (h *Histogram) Clone() *Histogram

func (*Histogram) GatherAll

func (h *Histogram) GatherAll() *Histogram

func (*Histogram) String

func (h *Histogram) String() string

type NoCompletionBallot

type NoCompletionBallot struct{}

func (*NoCompletionBallot) AllLocallyComplete

func (ncb *NoCompletionBallot) AllLocallyComplete() bool

type NoCompletionTxnEngine

type NoCompletionTxnEngine struct{}

func (*NoCompletionTxnEngine) NeedsCompletionNodes

func (ncte *NoCompletionTxnEngine) NeedsCompletionNodes() bool

type NoCompletionTxnEngineVar

type NoCompletionTxnEngineVar struct{}

func (*NoCompletionTxnEngineVar) TxnGloballyCompleteReceived

func (nctev *NoCompletionTxnEngineVar) TxnGloballyCompleteReceived(txn *p.Txn, ballot Ballot) error

type SimpleBallot

type SimpleBallot struct {
	*p.Txn

	NoCompletionBallot
	// contains filtered or unexported fields
}

func NewSimpleBallot

func NewSimpleBallot(txn *p.Txn, remaining, completions int) *SimpleBallot

func (*SimpleBallot) AllVotesReceived

func (sb *SimpleBallot) AllVotesReceived() bool

func (*SimpleBallot) IsAbort

func (sb *SimpleBallot) IsAbort() bool

func (*SimpleBallot) IsStable

func (sb *SimpleBallot) IsStable() bool

func (*SimpleBallot) Vote

func (sb *SimpleBallot) Vote(vi *VarInstance, decision p.Outcome) error

type StartingNodeModifier

type StartingNodeModifier func([]*gsim.GraphNode, map[*p.Txn]map[*VarInstance][]*gsim.GraphNode) []*gsim.GraphNode

type TxnEngine

type TxnEngine interface {
	NewBallot(*p.Txn, int, int) Ballot
	NewEngineVar(*VarInstance, *p.VarVersionValue) EngineVar
	NeedsCompletionNodes() bool
	Clone() TxnEngine
}

type VarInstance

type VarInstance struct {
	p.Var
	// contains filtered or unexported fields
}

func NewVarInstance

func NewVarInstance(id string, v p.Var) *VarInstance

func (*VarInstance) String

func (vi *VarInstance) String() string

type VarInstances

type VarInstances []*VarInstance

func (VarInstances) Len

func (vi VarInstances) Len() int

func (VarInstances) Less

func (vi VarInstances) Less(i, j int) bool

func (VarInstances) Sort

func (vi VarInstances) Sort()

func (VarInstances) Swap

func (vi VarInstances) Swap(i, j int)

Jump to

Keyboard shortcuts

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