Package org.infinispan.statetransfer
Interface StateConsumer
-
- All Known Implementing Classes:
ScatteredStateConsumerImpl
,StateConsumerImpl
public interface StateConsumer
Handles inbound state transfers.- Since:
- 5.2
- Author:
- anistor@redhat.com
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
applyState(Address sender, int topologyId, boolean pushTransfer, Collection<StateChunk> stateChunks)
CacheTopology
getCacheTopology()
Deprecated.Since 9.3, please useDistributionManager.getCacheTopology()
instead.boolean
isStateTransferInProgress()
boolean
isStateTransferInProgressForKey(Object key)
CompletableFuture<Void>
onTopologyUpdate(CacheTopology cacheTopology, boolean isRebalance)
Receive notification of topology changes.boolean
ownsData()
void
stop()
Cancels all incoming state transfers.void
stopApplyingState(int topologyId)
Stops applying incoming state.
-
-
-
Method Detail
-
getCacheTopology
@Deprecated CacheTopology getCacheTopology()
Deprecated.Since 9.3, please useDistributionManager.getCacheTopology()
instead.
-
isStateTransferInProgress
boolean isStateTransferInProgress()
-
isStateTransferInProgressForKey
boolean isStateTransferInProgressForKey(Object key)
-
onTopologyUpdate
CompletableFuture<Void> onTopologyUpdate(CacheTopology cacheTopology, boolean isRebalance)
Receive notification of topology changes. StateRequestCommands are issued for segments that are new to this member and the segments that are no longer owned are discarded.- Parameters:
cacheTopology
-isRebalance
-- Returns:
- future that is completed when the state transfer has finished
-
applyState
void applyState(Address sender, int topologyId, boolean pushTransfer, Collection<StateChunk> stateChunks)
-
stop
void stop()
Cancels all incoming state transfers. The already received data is not discarded. This is executed when the cache is shutting down.
-
stopApplyingState
void stopApplyingState(int topologyId)
Stops 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.- Parameters:
topologyId
-
-
ownsData
boolean ownsData()
- Returns:
- true if this node has already received the first rebalance command
-
-