client

package
v0.0.0-...-53b40aa Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2018 License: AGPL-3.0, AGPL-3.0-only Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func NewCache

func NewCache(rng *rand.Rand, roots map[common.VarUUId]*types.PosCapVer) *Cache

func (*Cache) AddCached

func (c *Cache) AddCached(vUUId *common.VarUUId, v *Cached)

func (*Cache) Find

func (c *Cache) Find(vUUId *common.VarUUId, exists bool) (*Cached, error)

func (*Cache) SetResolver

func (c *Cache) SetResolver(resolver *consistenthash.Resolver)

type Cached

type Cached struct {
	*Cache
	types.VerClock
	// contains filtered or unexported fields
}

func (*Cached) CreatePositions

func (c *Cached) CreatePositions(positionsLength int)

In here, we don't actually add to the cache because we don't know if the corresponding txn is going to commit or not.

func (*Cached) EnsureHashCodes

func (c *Cached) EnsureHashCodes() error

func (*Cached) UnionCaps

func (c *Cached) UnionCaps(cap common.Capability)

func (*Cached) UpdatePositions

func (c *Cached) UpdatePositions(pos *common.Positions)

type LocalTxnCompletionContinuation

type LocalTxnCompletionContinuation func(*txnreader.TxnReader, *msgs.Outcome, error) error

func (LocalTxnCompletionContinuation) Aborted

func (LocalTxnCompletionContinuation) Committed

type RemoteTransactionSubmitter

type RemoteTransactionSubmitter struct {
	*TransactionSubmitter
	// contains filtered or unexported fields
}

func NewRemoteTransactionSubmitter

func NewRemoteTransactionSubmitter(namespace []byte, connPub sconn.ServerConnectionPublisher, actor actor.EnqueueActor, rng *rand.Rand, logger log.Logger, roots map[common.VarUUId]*types.PosCapVer, metrics *cconn.ClientTxnMetrics, subCont RemoteTxnCompletionContinuation) *RemoteTransactionSubmitter

func (*RemoteTransactionSubmitter) Aborted

func (*RemoteTransactionSubmitter) Committed

func (*RemoteTransactionSubmitter) SubmitRemoteClientTransaction

func (rts *RemoteTransactionSubmitter) SubmitRemoteClientTransaction(txnId *common.TxnId, txn *cmsgs.ClientTxn, cont RemoteTxnCompletionContinuation) error

func (*RemoteTransactionSubmitter) SubscriptionConsumer

func (rts *RemoteTransactionSubmitter) SubscriptionConsumer(sm *SubscriptionManager, txn *txnreader.TxnReader, outcome *msgs.Outcome) error

func (*RemoteTransactionSubmitter) TopologyChanged

func (rts *RemoteTransactionSubmitter) TopologyChanged(topology *configuration.Topology) error

type RemoteTxnCompletionContinuation

type RemoteTxnCompletionContinuation func(origTxnId, txnId *common.TxnId, outcome *cmsgs.ClientTxnOutcome, err error) error

type SubscriptionConsumer

type SubscriptionConsumer func(sm *SubscriptionManager, txn *txnreader.TxnReader, outcome *msgs.Outcome) error

type SubscriptionManager

type SubscriptionManager struct {
	*TransactionRecord
	// contains filtered or unexported fields
}

func NewSubscriptionManager

func NewSubscriptionManager(subId *common.TxnId, tr *TransactionRecord, consumer SubscriptionConsumer) *SubscriptionManager

func (*SubscriptionManager) Deleted

func (sm *SubscriptionManager) Deleted(vUUId *common.VarUUId)

func (*SubscriptionManager) SubmissionOutcomeReceived

func (sm *SubscriptionManager) SubmissionOutcomeReceived(sender common.RMId, txn *txnreader.TxnReader, outcome *msgs.Outcome) (err error)

func (*SubscriptionManager) Unsubscribe

NB due to access to the cache, this is not safe to run concurrently with other SMs off the same TxnSubmitter.

type TransactionRecord

type TransactionRecord struct {
	*TransactionSubmitter

	Id *common.TxnId
	// contains filtered or unexported fields
}

func (*TransactionRecord) SubmissionOutcomeReceived

func (tr *TransactionRecord) SubmissionOutcomeReceived(sender common.RMId, subId *common.TxnId, txn *txnreader.TxnReader, outcome *msgs.Outcome) error

func (*TransactionRecord) Submit

func (tr *TransactionRecord) Submit()

func (*TransactionRecord) TopologyChanged

func (tr *TransactionRecord) TopologyChanged(topology *configuration.Topology)

type TransactionSubmitter

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

func NewTransactionSubmitter

func NewTransactionSubmitter(connPub sconn.ServerConnectionPublisher, actor actor.EnqueueActor, rng *rand.Rand, logger log.Logger) *TransactionSubmitter

func (*TransactionSubmitter) AddTransactionRecord

func (ts *TransactionSubmitter) AddTransactionRecord(tr *TransactionRecord, force bool)

func (*TransactionSubmitter) ServerConnectionsChanged

func (ts *TransactionSubmitter) ServerConnectionsChanged(servers map[common.RMId]sconn.ServerConnection) error

func (*TransactionSubmitter) Shutdown

func (ts *TransactionSubmitter) Shutdown(onceEmpty func([]*SubscriptionManager))

func (*TransactionSubmitter) Status

func (ts *TransactionSubmitter) Status(sc *status.StatusConsumer)

func (*TransactionSubmitter) SubmissionOutcomeReceived

func (ts *TransactionSubmitter) SubmissionOutcomeReceived(sender common.RMId, subId *common.TxnId, txn *txnreader.TxnReader, outcome *msgs.Outcome) error

func (*TransactionSubmitter) SubmitLocalClientTransaction

func (ts *TransactionSubmitter) SubmitLocalClientTransaction(txnId *common.TxnId, txn *cmsgs.ClientTxn, isTopologyTxn bool, roots map[common.VarUUId]*types.PosCapVer, translationCallback loco.TranslationCallback, cont LocalTxnCompletionContinuation) error

func (*TransactionSubmitter) SubmitLocalServerTransaction

func (ts *TransactionSubmitter) SubmitLocalServerTransaction(txnId *common.TxnId, txn *msgs.Txn, subscriptionConsumer SubscriptionConsumer, active common.RMIds, bbe *binarybackoff.BinaryBackoffEngine, cont LocalTxnCompletionContinuation)

func (*TransactionSubmitter) TopologyChanged

func (ts *TransactionSubmitter) TopologyChanged(topology *configuration.Topology) error

Jump to

Keyboard shortcuts

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