public class ScatteredStateConsumerImpl extends StateConsumerImpl
Modifier and Type | Class and Description |
---|---|
protected static class |
ScatteredStateConsumerImpl.KeyAndVersion |
StateConsumerImpl.KeyInvalidationListener
Modifier and Type | Field and Description |
---|---|
protected Collection<Address> |
backupAddress |
protected BlockingQueue<InternalCacheEntry<?,?>> |
backupQueue |
protected AtomicLong |
chunkCounter |
protected InternalEntryFactory |
entryFactory |
protected IntSet |
inboundSegments |
protected ConcurrentMap<Address,BlockingQueue<ScatteredStateConsumerImpl.KeyAndVersion>> |
invalidations |
protected Collection<Address> |
nonBackupAddresses |
protected ConcurrentMap<Address,BlockingQueue<Object>> |
retrievedEntries |
protected static long |
SKIP_OWNERSHIP_FLAGS |
protected ScatteredVersionManager<?> |
svm |
cache, cacheName, cacheNotifier, cacheTopology, commandAckCollector, commandsFactory, commitManager, configuration, dataContainer, distributionManager, icf, interceptorChain, isFetchEnabled, isInvalidationMode, isTransactional, keyInvalidationListener, keyPartitioner, localTopologyManager, NO_KEY, NO_STATE_TRANSFER_IN_PROGRESS, nonBlockingExecutor, persistenceManager, rpcManager, rpcOptions, STATE_TRANSFER_FLAGS, stateRequestExecutor, stateTransferFuture, stateTransferLock, stateTransferTopologyId, timeout, transactionManager, transactionTable, transferMapsLock, transfersBySegment, triangleOrderManager, waitingForState
Constructor and Description |
---|
ScatteredStateConsumerImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
beforeTopologyInstalled(int topologyId,
boolean startRebalance,
ConsistentHash previousWriteCh,
ConsistentHash newWriteCh) |
protected CompletionStage<Void> |
handleSegments(boolean startRebalance,
IntSet addedSegments,
IntSet removedSegments) |
protected void |
onTaskCompletion(InboundTransferTask inboundTransfer) |
CompletionStage<CompletionStage<Void>> |
onTopologyUpdate(CacheTopology cacheTopology,
boolean isRebalance)
Receive notification of topology changes.
|
protected CompletionStage<Void> |
removeStaleData(IntSet removedSegments) |
void |
start() |
void |
stopApplyingState(int topologyId)
Stops applying incoming state.
|
addTransfer, applyState, cancelTransfers, getOwnedSegments, hasActiveTransfers, isStateTransferInProgress, isStateTransferInProgressForKey, notifyEndOfStateTransferIfNeeded, ownsData, removeTransfer, setKeyInvalidationListener, stop
protected static final long SKIP_OWNERSHIP_FLAGS
protected InternalEntryFactory entryFactory
protected ScatteredVersionManager<?> svm
protected IntSet inboundSegments
protected AtomicLong chunkCounter
protected final ConcurrentMap<Address,BlockingQueue<Object>> retrievedEntries
protected BlockingQueue<InternalCacheEntry<?,?>> backupQueue
protected final ConcurrentMap<Address,BlockingQueue<ScatteredStateConsumerImpl.KeyAndVersion>> invalidations
protected Collection<Address> backupAddress
protected Collection<Address> nonBackupAddresses
public void start()
start
in class StateConsumerImpl
public CompletionStage<CompletionStage<Void>> onTopologyUpdate(CacheTopology cacheTopology, boolean isRebalance)
StateConsumer
StateTransferStartCommand
,
or ScatteredStateGetKeysCommand
for
CacheMode.SCATTERED_SYNC
, are issued for segments that are new to this
member and the segments that are no longer owned are discarded.onTopologyUpdate
in interface StateConsumer
onTopologyUpdate
in class StateConsumerImpl
protected void beforeTopologyInstalled(int topologyId, boolean startRebalance, ConsistentHash previousWriteCh, ConsistentHash newWriteCh)
beforeTopologyInstalled
in class StateConsumerImpl
protected CompletionStage<Void> handleSegments(boolean startRebalance, IntSet addedSegments, IntSet removedSegments)
handleSegments
in class StateConsumerImpl
protected void onTaskCompletion(InboundTransferTask inboundTransfer)
onTaskCompletion
in class StateConsumerImpl
public void stopApplyingState(int topologyId)
StateConsumerImpl
stopApplyingState
in interface StateConsumer
stopApplyingState
in class StateConsumerImpl
topologyId
- Topology id at the end of state transferprotected CompletionStage<Void> removeStaleData(IntSet removedSegments)
removeStaleData
in class StateConsumerImpl
Copyright © 2021 JBoss by Red Hat. All rights reserved.