protocol

package module
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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HistoryNode

type HistoryNode struct {
	CommittedTxn *Txn
	Next         []*HistoryNode
	Previous     []*HistoryNode
}

func NewHistoryNode

func NewHistoryNode(parent *HistoryNode, txn *Txn) *HistoryNode

func (*HistoryNode) AddEdgeTo

func (hn *HistoryNode) AddEdgeTo(nodes ...*HistoryNode)

func (*HistoryNode) Equal

func (hnA *HistoryNode) Equal(hnB *HistoryNode) bool

func (*HistoryNode) Len

func (hn *HistoryNode) Len() int

func (*HistoryNode) RemoveEdgeTo

func (hn *HistoryNode) RemoveEdgeTo(node *HistoryNode)

func (*HistoryNode) String

func (hn *HistoryNode) String() string

type Outcome

type Outcome int
const (
	Commit Outcome = iota
	Abort          = iota
)

func (Outcome) String

func (o Outcome) String() string

type Txn

type Txn struct {
	ID           int
	Actions      VarActions
	VarToActions map[Var]VarActions
}

func NewTxn

func NewTxn(id int, actions ...*VarAction) *Txn

func (*Txn) Clone

func (txn *Txn) Clone() *Txn

func (*Txn) Compare

func (a *Txn) Compare(bC sl.Comparable) sl.Cmp

func (*Txn) GetTxn

func (txn *Txn) GetTxn() *Txn

func (*Txn) String

func (txn *Txn) String() string

type TxnContainer

type TxnContainer interface {
	GetTxn() *Txn
}

type Txns

type Txns []*Txn

func (Txns) Equal

func (a Txns) Equal(b Txns) bool

func (Txns) Len

func (txns Txns) Len() int

func (Txns) Less

func (txns Txns) Less(i, j int) bool

func (Txns) String

func (txns Txns) String() string

func (Txns) Swap

func (txns Txns) Swap(i, j int)

type Var

type Var string

func (Var) String

func (v Var) String() string

type VarAction

type VarAction struct {
	Var
	ReadVersion int
	WroteValue  interface{}
}

func ReadAction

func ReadAction(v Var, ver int) *VarAction

func WriteAction

func WriteAction(v Var, value interface{}) *VarAction

func (*VarAction) IsRead

func (va *VarAction) IsRead() bool

func (*VarAction) IsWrite

func (va *VarAction) IsWrite() bool

func (*VarAction) String

func (va *VarAction) String() string

type VarActions

type VarActions []*VarAction

func (VarActions) Len

func (vas VarActions) Len() int

func (VarActions) Less

func (vas VarActions) Less(i, j int) bool

func (VarActions) Swap

func (vas VarActions) Swap(i, j int)

type VarVersionValue

type VarVersionValue struct {
	Var
	Version int
	Value   interface{}
}

func (*VarVersionValue) Clone

func (vvv *VarVersionValue) Clone() *VarVersionValue

func (*VarVersionValue) Equal

func (a *VarVersionValue) Equal(b *VarVersionValue) bool

func (*VarVersionValue) String

func (vvv *VarVersionValue) String() string

type VarVersionValues

type VarVersionValues []*VarVersionValue

func (VarVersionValues) Len

func (vvvs VarVersionValues) Len() int

func (VarVersionValues) Less

func (vvvs VarVersionValues) Less(i, j int) bool

func (VarVersionValues) Sort

func (vvvs VarVersionValues) Sort()

func (VarVersionValues) Swap

func (vvvs VarVersionValues) Swap(i, j int)

type Vars

type Vars []Var

func (Vars) Len

func (vars Vars) Len() int

func (Vars) Less

func (vars Vars) Less(i, j int) bool

func (Vars) Swap

func (vars Vars) Swap(i, j int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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