public abstract class BucketStoreActor<T extends BucketData<T>> extends AbstractUntypedPersistentActorWithMetering
Bucket per node. Buckets are versioned.
A node can write ONLY to its bucket. This way, write conflicts are avoided.
Buckets are sync'ed across nodes using Gossip protocol (http://en.wikipedia.org/wiki/Gossip_protocol).
This store uses a Gossiper.
akka.persistence.Eventsourced.AsyncHandlerInvocation, akka.persistence.Eventsourced.AsyncHandlerInvocation$, akka.persistence.Eventsourced.PendingHandlerInvocation, akka.persistence.Eventsourced.ProcessingState, akka.persistence.Eventsourced.RecoveryTick, akka.persistence.Eventsourced.RecoveryTick$, akka.persistence.Eventsourced.StashingHandlerInvocation, akka.persistence.Eventsourced.StashingHandlerInvocation$, akka.persistence.Eventsourced.StateLOG| Modifier | Constructor and Description |
|---|---|
protected |
BucketStoreActor(RemoteRpcProviderConfig config,
String persistenceId,
T initialData) |
| Modifier and Type | Method and Description |
|---|---|
protected RemoteRpcProviderConfig |
getConfig() |
T |
getLocalData() |
Map<akka.actor.Address,Bucket<T>> |
getRemoteBuckets() |
Map<akka.actor.Address,Long> |
getVersions() |
protected void |
handleCommand(Object message) |
protected void |
handleRecover(Object message) |
protected boolean |
isPersisting() |
protected abstract void |
onBucketRemoved(akka.actor.Address address,
Bucket<T> bucket)
Callback to subclasses invoked when a bucket is removed.
|
protected abstract void |
onBucketsUpdated(Map<akka.actor.Address,Bucket<T>> newBuckets)
Callback to subclasses invoked when the set of remote buckets is updated.
|
String |
persistenceId() |
void |
preStart() |
protected void |
updateLocalBucket(T data) |
executeInSelf, ignoreMessage, onReceiveCommand, onReceiveRecover, unknownMessageakka$actor$StashSupport$_setter_$akka$actor$StashSupport$$capacity_$eq, akka$actor$StashSupport$_setter_$mailbox_$eq, akka$actor$StashSupport$$capacity, akka$actor$StashSupport$$theStash_$eq, akka$actor$StashSupport$$theStash, akka$persistence$Eventsourced$_setter_$akka$persistence$Eventsourced$$extension_$eq, akka$persistence$Eventsourced$_setter_$akka$persistence$Eventsourced$$instanceId_$eq, akka$persistence$Eventsourced$_setter_$akka$persistence$Eventsourced$$internalStash_$eq, akka$persistence$Eventsourced$_setter_$akka$persistence$Eventsourced$$maxMessageBatchSize_$eq, akka$persistence$Eventsourced$_setter_$akka$persistence$Eventsourced$$pendingInvocations_$eq, akka$persistence$Eventsourced$_setter_$akka$persistence$Eventsourced$$persistingEvents_$eq, akka$persistence$Eventsourced$_setter_$akka$persistence$Eventsourced$$processingCommands_$eq, akka$persistence$Eventsourced$_setter_$akka$persistence$Eventsourced$$unstashFilterPredicate_$eq, akka$persistence$Eventsourced$_setter_$akka$persistence$Eventsourced$$writerUuid_$eq, akka$persistence$Eventsourced$$_lastSequenceNr_$eq, akka$persistence$Eventsourced$$_lastSequenceNr, akka$persistence$Eventsourced$$currentState_$eq, akka$persistence$Eventsourced$$currentState, akka$persistence$Eventsourced$$eventBatch_$eq, akka$persistence$Eventsourced$$eventBatch, akka$persistence$Eventsourced$$extension, akka$persistence$Eventsourced$$instanceId, akka$persistence$Eventsourced$$internalStash, akka$persistence$Eventsourced$$journalBatch_$eq, akka$persistence$Eventsourced$$journalBatch, akka$persistence$Eventsourced$$maxMessageBatchSize, akka$persistence$Eventsourced$$pendingInvocations, akka$persistence$Eventsourced$$pendingStashingPersistInvocations_$eq, akka$persistence$Eventsourced$$pendingStashingPersistInvocations, akka$persistence$Eventsourced$$persistingEvents, akka$persistence$Eventsourced$$processingCommands, akka$persistence$Eventsourced$$sequenceNr_$eq, akka$persistence$Eventsourced$$sequenceNr, akka$persistence$Eventsourced$$unstashFilterPredicate, akka$persistence$Eventsourced$$writeInProgress_$eq, akka$persistence$Eventsourced$$writeInProgress, akka$persistence$Eventsourced$$writerUuid, aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, clearStash, createStash, defer, deferAsync, deleteMessages, deleteSnapshot, deleteSnapshots, internalDefer, internalDeferAsync, internalDeleteMessagesBeforeSnapshot, internalPersist, internalPersistAll, internalPersistAllAsync, internalPersistAsync, internalStashOverflowStrategy, journal, journalPluginId, lastSequenceNr, loadSnapshot, mailbox, onPersistFailure, onPersistRejected, onReceive, onRecoveryFailure, onReplaySuccess, persist, persistAll, persistAllAsync, persistAsync, postStop, prepend, preRestart, receiveCommand, receiveRecover, recovery, recoveryFinished, recoveryRunning, saveSnapshot, snapshotPluginId, snapshotSequenceNr, snapshotStore, snapshotterId, stash, unhandled, unstash, unstashAll, unstashAllakka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, context, getContext, getSelf, getSender, postRestart, receive, self, sender, supervisorStrategyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait$init$, akka$persistence$Eventsourced$$changeState, akka$persistence$Eventsourced$$flushBatch, akka$persistence$Eventsourced$$flushJournalBatch, akka$persistence$Eventsourced$$peekApplyHandler, akka$persistence$Eventsourced$$recovering, akka$persistence$Eventsourced$$setLastSequenceNr, akka$persistence$Eventsourced$$startRecovery, akka$persistence$Eventsourced$$stashInternally, akka$persistence$Eventsourced$$unstashInternally, akka$persistence$Eventsourced$$updateLastSequenceNr, akka$persistence$Eventsourced$$writeEventFailed, akka$persistence$Eventsourced$$writeEventRejected, akka$persistence$Eventsourced$$writeEventSucceededprotected BucketStoreActor(RemoteRpcProviderConfig config, String persistenceId, T initialData)
public final T getLocalData()
public final String persistenceId()
public void preStart()
preStart in interface akka.actor.ActorpreStart in class akka.actor.UntypedActorprotected void handleCommand(Object message) throws Exception
handleCommand in class AbstractUntypedPersistentActorExceptionprotected final void handleRecover(Object message)
handleRecover in class AbstractUntypedPersistentActorprotected final RemoteRpcProviderConfig getConfig()
protected final void updateLocalBucket(T data)
protected abstract void onBucketRemoved(akka.actor.Address address,
Bucket<T> bucket)
address - Remote addressbucket - Bucket removedprotected abstract void onBucketsUpdated(Map<akka.actor.Address,Bucket<T>> newBuckets)
newBuckets - Map of address to new bucket. Never null, but can be empty.protected boolean isPersisting()
Copyright © 2019 OpenDaylight. All rights reserved.