dragon

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GetLockCommand          = "get"
	ReleaseLockCommand      = "release"
	LockSMResultTrue   byte = 1
	LockSMResultFalse  byte = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Dragon

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

func NewDragon

func NewDragon(cnf conf.Config, stopSignaller *common.AtomicBool) (*Dragon, error)

func (*Dragon) AddToDeleteBatch

func (d *Dragon) AddToDeleteBatch(deleteBatch *cluster.ToDeleteBatch) error

func (*Dragon) CreateSnapshot

func (d *Dragon) CreateSnapshot() (cluster.Snapshot, error)

func (*Dragon) DeleteAllDataInRangeForAllShardsLocally

func (d *Dragon) DeleteAllDataInRangeForAllShardsLocally(startPrefix []byte, endPrefix []byte) error

func (*Dragon) DeleteAllDataInRangeForShardLocally

func (d *Dragon) DeleteAllDataInRangeForShardLocally(shardID uint64, startPrefix []byte, endPrefix []byte) error

func (*Dragon) ExecuteForwardBatch added in v0.1.6

func (d *Dragon) ExecuteForwardBatch(shardID uint64, batch []byte) error

func (*Dragon) ExecuteRemotePullQuery

func (d *Dragon) ExecuteRemotePullQuery(queryInfo *cluster.QueryExecutionInfo, rowsFactory *common.RowsFactory) (*common.Rows, error)

func (*Dragon) GenerateClusterSequence

func (d *Dragon) GenerateClusterSequence(sequenceName string) (uint64, error)

func (*Dragon) GetAllShardIDs

func (d *Dragon) GetAllShardIDs() []uint64

func (*Dragon) GetLeaderInfosHandler added in v0.1.6

func (d *Dragon) GetLeaderInfosHandler() remoting.ClusterMessageHandler

func (*Dragon) GetLeadersMap added in v0.1.6

func (d *Dragon) GetLeadersMap() (map[uint64]uint64, error)

func (*Dragon) GetLocalShardIDs

func (d *Dragon) GetLocalShardIDs() []uint64

func (*Dragon) GetLock

func (d *Dragon) GetLock(prefix string) (bool, error)

func (*Dragon) GetNodeID

func (d *Dragon) GetNodeID() int

func (*Dragon) GetRemoteProposeHandler

func (d *Dragon) GetRemoteProposeHandler() remoting.ClusterMessageHandler

func (*Dragon) GetRemoteReadHandler

func (d *Dragon) GetRemoteReadHandler() remoting.ClusterMessageHandler

func (*Dragon) LinearizableGet added in v0.1.6

func (d *Dragon) LinearizableGet(shardID uint64, key []byte) ([]byte, error)

func (*Dragon) LocalGet

func (d *Dragon) LocalGet(key []byte) ([]byte, error)

func (*Dragon) LocalScan

func (d *Dragon) LocalScan(startKeyPrefix []byte, endKeyPrefix []byte, limit int) ([]cluster.KVPair, error)

func (*Dragon) LocalScanWithSnapshot

func (d *Dragon) LocalScanWithSnapshot(sn cluster.Snapshot, startKeyPrefix []byte, endKeyPrefix []byte, limit int) ([]cluster.KVPair, error)

func (*Dragon) PostStartChecks

func (d *Dragon) PostStartChecks(queryExec common.SimpleQueryExec) error

func (*Dragon) RegisterEndFill added in v0.1.6

func (d *Dragon) RegisterEndFill()

func (*Dragon) RegisterShardListenerFactory

func (d *Dragon) RegisterShardListenerFactory(factory cluster.ShardListenerFactory)

func (*Dragon) RegisterStartFill added in v0.1.6

func (d *Dragon) RegisterStartFill(expectedLeaders map[uint64]uint64, interruptor *interruptor.Interruptor) error

func (*Dragon) ReleaseLock

func (d *Dragon) ReleaseLock(prefix string) (bool, error)

func (*Dragon) RemoveToDeleteBatch

func (d *Dragon) RemoveToDeleteBatch(deleteBatch *cluster.ToDeleteBatch) error

func (*Dragon) RestoreSnapshotCount added in v0.1.6

func (d *Dragon) RestoreSnapshotCount() int64

func (*Dragon) SaveSnapshotCount added in v0.1.6

func (d *Dragon) SaveSnapshotCount() int64

func (*Dragon) SetForwardWriteHandler added in v0.1.6

func (d *Dragon) SetForwardWriteHandler(forwardWriteHandler cluster.ForwardWriteHandler)

func (*Dragon) SetRemoteQueryExecutionCallback

func (d *Dragon) SetRemoteQueryExecutionCallback(callback cluster.RemoteQueryExecutionCallback)

func (*Dragon) Start

func (d *Dragon) Start() error

func (*Dragon) Stop

func (d *Dragon) Stop() error

func (*Dragon) SyncStore added in v0.1.6

func (d *Dragon) SyncStore() error

func (*Dragon) WriteBatch

func (d *Dragon) WriteBatch(batch *cluster.WriteBatch, localOnly bool) error

func (*Dragon) WriteBatchLocally

func (d *Dragon) WriteBatchLocally(batch *cluster.WriteBatch) error

func (*Dragon) WriteForwardBatch

func (d *Dragon) WriteForwardBatch(batch *cluster.WriteBatch, localOnly bool) error

type ShardOnDiskStateMachine

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

func (*ShardOnDiskStateMachine) Close

func (s *ShardOnDiskStateMachine) Close() error

func (*ShardOnDiskStateMachine) Lookup

func (s *ShardOnDiskStateMachine) Lookup(i interface{}) (interface{}, error)

func (*ShardOnDiskStateMachine) Open

func (s *ShardOnDiskStateMachine) Open(stopc <-chan struct{}) (uint64, error)

func (*ShardOnDiskStateMachine) PrepareSnapshot

func (s *ShardOnDiskStateMachine) PrepareSnapshot() (interface{}, error)

func (*ShardOnDiskStateMachine) RecoverFromSnapshot

func (s *ShardOnDiskStateMachine) RecoverFromSnapshot(reader io.Reader, i <-chan struct{}) error

func (*ShardOnDiskStateMachine) SaveSnapshot

func (s *ShardOnDiskStateMachine) SaveSnapshot(i interface{}, writer io.Writer, _ <-chan struct{}) error

func (*ShardOnDiskStateMachine) Sync

func (s *ShardOnDiskStateMachine) Sync() error

func (*ShardOnDiskStateMachine) Update

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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