Documentation ¶
Index ¶
- Constants
- type Dragon
- func (d *Dragon) AddToDeleteBatch(deleteBatch *cluster.ToDeleteBatch) error
- func (d *Dragon) CreateSnapshot() (cluster.Snapshot, error)
- func (d *Dragon) DeleteAllDataInRangeForAllShardsLocally(startPrefix []byte, endPrefix []byte) error
- func (d *Dragon) DeleteAllDataInRangeForShardLocally(shardID uint64, startPrefix []byte, endPrefix []byte) error
- func (d *Dragon) ExecuteForwardBatch(shardID uint64, batch []byte) error
- func (d *Dragon) ExecuteRemotePullQuery(queryInfo *cluster.QueryExecutionInfo, rowsFactory *common.RowsFactory) (*common.Rows, error)
- func (d *Dragon) GenerateClusterSequence(sequenceName string) (uint64, error)
- func (d *Dragon) GetAllShardIDs() []uint64
- func (d *Dragon) GetLeaderInfosHandler() remoting.ClusterMessageHandler
- func (d *Dragon) GetLeadersMap() (map[uint64]uint64, error)
- func (d *Dragon) GetLocalShardIDs() []uint64
- func (d *Dragon) GetLock(prefix string) (bool, error)
- func (d *Dragon) GetNodeID() int
- func (d *Dragon) GetRemoteProposeHandler() remoting.ClusterMessageHandler
- func (d *Dragon) GetRemoteReadHandler() remoting.ClusterMessageHandler
- func (d *Dragon) LinearizableGet(shardID uint64, key []byte) ([]byte, error)
- func (d *Dragon) LocalGet(key []byte) ([]byte, error)
- func (d *Dragon) LocalScan(startKeyPrefix []byte, endKeyPrefix []byte, limit int) ([]cluster.KVPair, error)
- func (d *Dragon) LocalScanWithSnapshot(sn cluster.Snapshot, startKeyPrefix []byte, endKeyPrefix []byte, limit int) ([]cluster.KVPair, error)
- func (d *Dragon) PostStartChecks(queryExec common.SimpleQueryExec) error
- func (d *Dragon) RegisterEndFill()
- func (d *Dragon) RegisterShardListenerFactory(factory cluster.ShardListenerFactory)
- func (d *Dragon) RegisterStartFill(expectedLeaders map[uint64]uint64, interruptor *interruptor.Interruptor) error
- func (d *Dragon) ReleaseLock(prefix string) (bool, error)
- func (d *Dragon) RemoveToDeleteBatch(deleteBatch *cluster.ToDeleteBatch) error
- func (d *Dragon) RestoreSnapshotCount() int64
- func (d *Dragon) SaveSnapshotCount() int64
- func (d *Dragon) SetForwardWriteHandler(forwardWriteHandler cluster.ForwardWriteHandler)
- func (d *Dragon) SetRemoteQueryExecutionCallback(callback cluster.RemoteQueryExecutionCallback)
- func (d *Dragon) Start() error
- func (d *Dragon) Stop() error
- func (d *Dragon) SyncStore() error
- func (d *Dragon) WriteBatch(batch *cluster.WriteBatch, localOnly bool) error
- func (d *Dragon) WriteBatchLocally(batch *cluster.WriteBatch) error
- func (d *Dragon) WriteForwardBatch(batch *cluster.WriteBatch, localOnly bool) error
- type ShardOnDiskStateMachine
- func (s *ShardOnDiskStateMachine) Close() error
- func (s *ShardOnDiskStateMachine) Lookup(i interface{}) (interface{}, error)
- func (s *ShardOnDiskStateMachine) Open(stopc <-chan struct{}) (uint64, error)
- func (s *ShardOnDiskStateMachine) PrepareSnapshot() (interface{}, error)
- func (s *ShardOnDiskStateMachine) RecoverFromSnapshot(reader io.Reader, i <-chan struct{}) error
- func (s *ShardOnDiskStateMachine) SaveSnapshot(i interface{}, writer io.Writer, _ <-chan struct{}) error
- func (s *ShardOnDiskStateMachine) Sync() error
- func (s *ShardOnDiskStateMachine) Update(entries []statemachine.Entry) ([]statemachine.Entry, error)
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 (*Dragon) AddToDeleteBatch ¶
func (d *Dragon) AddToDeleteBatch(deleteBatch *cluster.ToDeleteBatch) error
func (*Dragon) DeleteAllDataInRangeForAllShardsLocally ¶
func (*Dragon) DeleteAllDataInRangeForShardLocally ¶
func (*Dragon) ExecuteForwardBatch ¶ added in v0.1.6
func (*Dragon) ExecuteRemotePullQuery ¶
func (d *Dragon) ExecuteRemotePullQuery(queryInfo *cluster.QueryExecutionInfo, rowsFactory *common.RowsFactory) (*common.Rows, error)
func (*Dragon) GenerateClusterSequence ¶
func (*Dragon) GetAllShardIDs ¶
func (*Dragon) GetLeaderInfosHandler ¶ added in v0.1.6
func (d *Dragon) GetLeaderInfosHandler() remoting.ClusterMessageHandler
func (*Dragon) GetLeadersMap ¶ added in v0.1.6
func (*Dragon) GetLocalShardIDs ¶
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 (*Dragon) LocalScanWithSnapshot ¶
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) RemoveToDeleteBatch ¶
func (d *Dragon) RemoveToDeleteBatch(deleteBatch *cluster.ToDeleteBatch) error
func (*Dragon) RestoreSnapshotCount ¶ added in v0.1.6
func (*Dragon) SaveSnapshotCount ¶ added in v0.1.6
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) 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 ¶
func (s *ShardOnDiskStateMachine) Update(entries []statemachine.Entry) ([]statemachine.Entry, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.