Package org.infinispan.statetransfer
Class StateProviderImpl
java.lang.Object
org.infinispan.statetransfer.StateProviderImpl
- All Implemented Interfaces:
StateProvider
- Direct Known Subclasses:
ScatteredStateProviderImpl
StateProvider
implementation.- Since:
- 5.2
- Author:
- [email protected]
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected int
protected CommandsFactory
protected InternalDataContainer<Object,
Object> protected DistributionManager
protected InternalEntryFactory
protected KeyPartitioner
protected LocalPublisherManager<?,
?> protected PersistenceManager
protected RpcManager
protected StateTransferLock
protected long
protected TransactionOriginatorChecker
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addTransfer
(OutboundTransferTask transferTask) void
cancelOutboundTransfer
(Address destination, int topologyId, org.infinispan.commons.util.IntSet segments) Cancel sending of cache entries that belong to the given set of segments.getTransactionsForSegments
(Address destination, int requestTopologyId, org.infinispan.commons.util.IntSet segments) Gets the list of transactions that affect keys from the given segments.boolean
protected void
logError
(OutboundTransferTask task, Throwable t) protected void
onTaskCompletion
(OutboundTransferTask transferTask) onTopologyUpdate
(CacheTopology cacheTopology, boolean isRebalance) Receive notification of topology changes.protected io.reactivex.rxjava3.core.Flowable<SegmentPublisherSupplier.Notification<InternalCacheEntry<?,
?>>> readEntries
(org.infinispan.commons.util.IntSet segments) void
start()
void
startOutboundTransfer
(Address destination, int requestTopologyId, org.infinispan.commons.util.IntSet segments, boolean applyState) Start to send cache entries that belong to the given set of segments.void
stop()
Cancels all outbound state transfers.
-
Field Details
-
cacheName
-
rpcManager
-
commandsFactory
-
dataContainer
-
persistenceManager
-
stateTransferLock
-
entryFactory
-
keyPartitioner
-
distributionManager
-
transactionOriginatorChecker
-
localPublisherManager
-
timeout
protected long timeout -
chunkSize
protected int chunkSize
-
-
Constructor Details
-
StateProviderImpl
public StateProviderImpl()
-
-
Method Details
-
isStateTransferInProgress
public boolean isStateTransferInProgress()- Specified by:
isStateTransferInProgress
in interfaceStateProvider
-
onTopologyUpdate
Description copied from interface:StateProvider
Receive notification of topology changes. Cancels all outbound transfers to destinations that are no longer members. The other outbound transfers remain unaffected.- Specified by:
onTopologyUpdate
in interfaceStateProvider
-
start
public void start()- Specified by:
start
in interfaceStateProvider
-
stop
public void stop()Description copied from interface:StateProvider
Cancels all outbound state transfers. This is executed when the cache is shutting down.- Specified by:
stop
in interfaceStateProvider
-
getTransactionsForSegments
public CompletionStage<List<TransactionInfo>> getTransactionsForSegments(Address destination, int requestTopologyId, org.infinispan.commons.util.IntSet segments) Description copied from interface:StateProvider
Gets the list of transactions that affect keys from the given segments. This is invoked in response to aStateTransferGetTransactionsCommand
.- Specified by:
getTransactionsForSegments
in interfaceStateProvider
- Parameters:
destination
- the address of the requesterrequestTopologyId
- required topology before we can start collecting transactionssegments
- only return transactions affecting these segments- Returns:
- a
CompletionStage
that completes with the list transactions and locks for the given segments
-
getClusterListenersToInstall
- Specified by:
getClusterListenersToInstall
in interfaceStateProvider
-
startOutboundTransfer
public void startOutboundTransfer(Address destination, int requestTopologyId, org.infinispan.commons.util.IntSet segments, boolean applyState) Description copied from interface:StateProvider
Start to send cache entries that belong to the given set of segments. This is invoked in response to aStateTransferStartCommand
. If the applyState field is set to false, then upon delivery at the destination the cache entries are processed by aStateReceiver
and are not applied to the local cache.- Specified by:
startOutboundTransfer
in interfaceStateProvider
- Parameters:
destination
- the address of the requester
-
readEntries
protected io.reactivex.rxjava3.core.Flowable<SegmentPublisherSupplier.Notification<InternalCacheEntry<?,?>>> readEntries(org.infinispan.commons.util.IntSet segments) -
addTransfer
-
cancelOutboundTransfer
public void cancelOutboundTransfer(Address destination, int topologyId, org.infinispan.commons.util.IntSet segments) Description copied from interface:StateProvider
Cancel sending of cache entries that belong to the given set of segments. This is invoked in response to aStateTransferCancelCommand
.- Specified by:
cancelOutboundTransfer
in interfaceStateProvider
- Parameters:
destination
- the address of the requestersegments
- the segments that we have to cancel transfer for
-
onTaskCompletion
-
logError
-