Package org.infinispan.scattered.impl
Class ScatteredStateConsumerImpl
java.lang.Object
org.infinispan.statetransfer.StateConsumerImpl
org.infinispan.scattered.impl.ScatteredStateConsumerImpl
- All Implemented Interfaces:
StateConsumer
- Author:
- Radim Vansa <rvansa@redhat.com>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.infinispan.statetransfer.StateConsumerImpl
StateConsumerImpl.KeyInvalidationListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Collection<Address>protected BlockingQueue<InternalCacheEntry<?,?>> protected AtomicLongprotected InternalEntryFactoryprotected org.infinispan.commons.util.IntSetprotected final ConcurrentMap<Address,BlockingQueue<ScatteredStateConsumerImpl.KeyAndVersion>> protected Collection<Address>protected final ConcurrentMap<Address,BlockingQueue<Object>> protected static final longprotected ScatteredVersionManager<?>Fields inherited from class org.infinispan.statetransfer.StateConsumerImpl
cache, cacheName, cacheNotifier, cacheTopology, commandAckCollector, commandsFactory, commitManager, configuration, conflictManager, dataContainer, distributionManager, icf, interceptorChain, INVALIDATE_FLAGS, isFetchEnabled, isInvalidationMode, isTransactional, keyInvalidationListener, keyPartitioner, localPublisherManager, 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbeforeTopologyInstalled(int topologyId, ConsistentHash previousWriteCh, ConsistentHash newWriteCh) protected CompletionStage<Void>handleSegments(boolean isRebalance, org.infinispan.commons.util.IntSet addedSegments, org.infinispan.commons.util.IntSet removedSegments, org.infinispan.commons.util.IntSet transactionOnlySegments) protected voidonCompletedSegment(int segmentId) protected voidonTaskCompletion(InboundTransferTask inboundTransfer) onTopologyUpdate(CacheTopology cacheTopology, boolean isRebalance) Receive notification of topology changes.protected CompletionStage<Void>removeStaleData(org.infinispan.commons.util.IntSet removedSegments) voidstart()voidstopApplyingState(int topologyId) Stops applying incoming state.Methods inherited from class org.infinispan.statetransfer.StateConsumerImpl
addTransfer, applyState, cancelTransfers, getOwnedSegments, hasActiveTransfers, inflightRequestCount, inflightTransactionSegmentCount, invalidateBatch, isStateTransferInProgress, isStateTransferInProgressForKey, notifyEndOfStateTransferIfNeeded, ownsData, removeTransfer, setKeyInvalidationListener, stop
-
Field Details
-
SKIP_OWNERSHIP_FLAGS
protected static final long SKIP_OWNERSHIP_FLAGS -
entryFactory
-
svm
-
inboundSegments
protected org.infinispan.commons.util.IntSet inboundSegments -
chunkCounter
-
retrievedEntries
-
backupQueue
-
invalidations
protected final ConcurrentMap<Address,BlockingQueue<ScatteredStateConsumerImpl.KeyAndVersion>> invalidations -
backupAddress
-
nonBackupAddresses
-
-
Constructor Details
-
ScatteredStateConsumerImpl
public ScatteredStateConsumerImpl()
-
-
Method Details
-
start
public void start()- Overrides:
startin classStateConsumerImpl
-
onTopologyUpdate
public CompletionStage<CompletionStage<Void>> onTopologyUpdate(CacheTopology cacheTopology, boolean isRebalance) Description copied from interface:StateConsumerReceive notification of topology changes.StateTransferStartCommand, orScatteredStateGetKeysCommandforCacheMode.SCATTERED_SYNC, are issued for segments that are new to this member and the segments that are no longer owned are discarded.- Specified by:
onTopologyUpdatein interfaceStateConsumer- Overrides:
onTopologyUpdatein classStateConsumerImpl- Returns:
- completion stage that is completed when the topology update is processed, wrapping another completion stage that is completed when the state transfer has finished
-
beforeTopologyInstalled
protected void beforeTopologyInstalled(int topologyId, ConsistentHash previousWriteCh, ConsistentHash newWriteCh) - Overrides:
beforeTopologyInstalledin classStateConsumerImpl
-
handleSegments
protected CompletionStage<Void> handleSegments(boolean isRebalance, org.infinispan.commons.util.IntSet addedSegments, org.infinispan.commons.util.IntSet removedSegments, org.infinispan.commons.util.IntSet transactionOnlySegments) - Overrides:
handleSegmentsin classStateConsumerImpl
-
onTaskCompletion
- Overrides:
onTaskCompletionin classStateConsumerImpl
-
onCompletedSegment
protected void onCompletedSegment(int segmentId) - Overrides:
onCompletedSegmentin classStateConsumerImpl
-
stopApplyingState
public void stopApplyingState(int topologyId) Description copied from class:StateConsumerImplStops applying incoming state. Also stops tracking updated keys. Should be called at the end of state transfer or when a ClearCommand is committed during state transfer.- Specified by:
stopApplyingStatein interfaceStateConsumer- Overrides:
stopApplyingStatein classStateConsumerImpl- Parameters:
topologyId- Topology id at the end of state transfer
-
removeStaleData
- Overrides:
removeStaleDatain classStateConsumerImpl
-