ttypes

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyWriteKeyInfo = WriteKeyInfo{}

Functions

This section is empty.

Types

type KeyVersions

type KeyVersions map[string]types.TxnInternalVersion

func (KeyVersions) Contains

func (kvs KeyVersions) Contains(key string) bool

func (KeyVersions) MustFirstKey

func (kvs KeyVersions) MustFirstKey() string

type WriteKeyInfo

type WriteKeyInfo struct {
	LastWrittenVersion types.TxnInternalVersion
	LastTask           *types.ListTask

	CommittedCleared, Committed, Rollbacked bool
}

func NewWriteKeyInfo

func NewWriteKeyInfo(lastWrittenVersion types.TxnInternalVersion) WriteKeyInfo

func (WriteKeyInfo) IsEmpty

func (ks WriteKeyInfo) IsEmpty() bool

type WriteKeyInfos

type WriteKeyInfos struct {
	KV          types.KVCC
	TaskTimeout time.Duration
	// contains filtered or unexported fields
}

func (WriteKeyInfos) AreWrittenKeysCompleted

func (ks WriteKeyInfos) AreWrittenKeysCompleted() bool

func (WriteKeyInfos) ContainsWrittenKey

func (ks WriteKeyInfos) ContainsWrittenKey(key string) bool

func (WriteKeyInfos) ForEachWrittenKey

func (ks WriteKeyInfos) ForEachWrittenKey(f func(key string, info WriteKeyInfo))

func (WriteKeyInfos) GetCommittedVersion

func (ks WriteKeyInfos) GetCommittedVersion(key string) types.TxnInternalVersion

func (WriteKeyInfos) GetCopiedWriteKeyTasks

func (ks WriteKeyInfos) GetCopiedWriteKeyTasks() []*basic.Task

func (WriteKeyInfos) GetCopiedWriteKeyTasksEx

func (ks WriteKeyInfos) GetCopiedWriteKeyTasksEx() ([]*basic.Task, []*types.ListTask)

func (WriteKeyInfos) GetLastWriteKeyTask

func (ks WriteKeyInfos) GetLastWriteKeyTask(key string) *types.ListTask

func (WriteKeyInfos) GetLastWriteKeyTasks

func (ks WriteKeyInfos) GetLastWriteKeyTasks(allWriteKeyTasks []*types.ListTask) []*types.ListTask

func (WriteKeyInfos) GetSucceededWrittenKeysUnsafe

func (ks WriteKeyInfos) GetSucceededWrittenKeysUnsafe() map[string]types.ValueCC

func (WriteKeyInfos) GetWriteKeyTasks

func (ks WriteKeyInfos) GetWriteKeyTasks() []*types.ListTask

func (WriteKeyInfos) GetWrittenKey2LastVersion

func (ks WriteKeyInfos) GetWrittenKey2LastVersion() (keys KeyVersions)

func (WriteKeyInfos) GetWrittenKeyCount

func (ks WriteKeyInfos) GetWrittenKeyCount() int

func (*WriteKeyInfos) InitializeWrittenKeys

func (ks *WriteKeyInfos) InitializeWrittenKeys(key2LastWrittenVersion KeyVersions, completed bool)

func (WriteKeyInfos) IsWrittenKeyRollbacked

func (ks WriteKeyInfos) IsWrittenKeyRollbacked(key string) bool

func (WriteKeyInfos) MarkAllWrittenKeysCommitted

func (ks WriteKeyInfos) MarkAllWrittenKeysCommitted()

func (WriteKeyInfos) MarkCommitted

func (ks WriteKeyInfos) MarkCommitted(key string, value types.Value)

func (WriteKeyInfos) MarkCommittedCleared

func (ks WriteKeyInfos) MarkCommittedCleared(key string, value types.Value)

func (*WriteKeyInfos) MarkWrittenKeyCompleted

func (ks *WriteKeyInfos) MarkWrittenKeyCompleted()

MarkWrittenKeyCompleted, keys and LastWrittenVersion won't change after this call.

func (WriteKeyInfos) MarkWrittenKeyRollbacked

func (ks WriteKeyInfos) MarkWrittenKeyRollbacked(key string)

func (WriteKeyInfos) MatchWrittenKeys

func (ks WriteKeyInfos) MatchWrittenKeys(keysWithWriteIntent KeyVersions) bool

func (*WriteKeyInfos) WriteKey

Jump to

Keyboard shortcuts

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