public class StateProviderImpl extends Object implements StateProvider
StateProvider implementation.| Modifier and Type | Field and Description |
|---|---|
protected String |
cacheName |
protected int |
chunkSize |
protected CommandsFactory |
commandsFactory |
protected InternalDataContainer<Object,Object> |
dataContainer |
protected DistributionManager |
distributionManager |
protected InternalEntryFactory |
entryFactory |
protected KeyPartitioner |
keyPartitioner |
protected PersistenceManager |
persistenceManager |
protected RpcManager |
rpcManager |
protected StateTransferLock |
stateTransferLock |
protected long |
timeout |
protected TransactionOriginatorChecker |
transactionOriginatorChecker |
| Constructor and Description |
|---|
StateProviderImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addTransfer(OutboundTransferTask transferTask) |
void |
cancelOutboundTransfer(Address destination,
int topologyId,
IntSet segments)
Cancel sending of cache entries that belong to the given set of segments.
|
Collection<ClusterListenerReplicateCallable<Object,Object>> |
getClusterListenersToInstall() |
CompletionStage<List<TransactionInfo>> |
getTransactionsForSegments(Address destination,
int requestTopologyId,
IntSet segments)
Gets the list of transactions that affect keys from the given segments.
|
boolean |
isStateTransferInProgress() |
protected void |
logError(OutboundTransferTask task,
Throwable t) |
protected void |
onTaskCompletion(OutboundTransferTask transferTask) |
CompletableFuture<Void> |
onTopologyUpdate(CacheTopology cacheTopology,
boolean isRebalance)
Receive notification of topology changes.
|
protected io.reactivex.rxjava3.core.Flowable<InternalCacheEntry<Object,Object>> |
publishDataContainerEntries(IntSet segments) |
protected io.reactivex.rxjava3.core.Flowable<InternalCacheEntry<Object,Object>> |
publishStoreEntries(IntSet segments) |
void |
start() |
void |
startOutboundTransfer(Address destination,
int requestTopologyId,
IntSet segments,
boolean applyState)
Start to send cache entries that belong to the given set of segments.
|
void |
stop()
Cancels all outbound state transfers.
|
protected String cacheName
protected RpcManager rpcManager
protected CommandsFactory commandsFactory
protected InternalDataContainer<Object,Object> dataContainer
protected PersistenceManager persistenceManager
protected StateTransferLock stateTransferLock
protected InternalEntryFactory entryFactory
protected KeyPartitioner keyPartitioner
protected DistributionManager distributionManager
protected TransactionOriginatorChecker transactionOriginatorChecker
protected long timeout
protected int chunkSize
public boolean isStateTransferInProgress()
isStateTransferInProgress in interface StateProviderpublic CompletableFuture<Void> onTopologyUpdate(CacheTopology cacheTopology, boolean isRebalance)
StateProvideronTopologyUpdate in interface StateProviderpublic void start()
start in interface StateProviderpublic void stop()
StateProviderstop in interface StateProviderpublic CompletionStage<List<TransactionInfo>> getTransactionsForSegments(Address destination, int requestTopologyId, IntSet segments)
StateProviderStateTransferGetTransactionsCommand.getTransactionsForSegments in interface StateProviderdestination - the address of the requesterrequestTopologyId - required topology before we can start collecting transactionssegments - only return transactions affecting these segmentsCompletionStage that completes with the list transactions and locks for the given segmentspublic Collection<ClusterListenerReplicateCallable<Object,Object>> getClusterListenersToInstall()
getClusterListenersToInstall in interface StateProviderpublic void startOutboundTransfer(Address destination, int requestTopologyId, IntSet segments, boolean applyState)
StateProviderStateTransferStartCommand.
If the applyState field is set to false, then upon delivery at the destination the cache entries are processed
by a StateReceiver and are not applied to the local cache.startOutboundTransfer in interface StateProviderdestination - the address of the requesterprotected io.reactivex.rxjava3.core.Flowable<InternalCacheEntry<Object,Object>> publishDataContainerEntries(IntSet segments)
protected io.reactivex.rxjava3.core.Flowable<InternalCacheEntry<Object,Object>> publishStoreEntries(IntSet segments)
protected void addTransfer(OutboundTransferTask transferTask)
public void cancelOutboundTransfer(Address destination, int topologyId, IntSet segments)
StateProviderStateTransferCancelCommand.cancelOutboundTransfer in interface StateProviderdestination - the address of the requestersegments - the segments that we have to cancel transfer forprotected void onTaskCompletion(OutboundTransferTask transferTask)
protected void logError(OutboundTransferTask task, Throwable t)
Copyright © 2022 JBoss by Red Hat. All rights reserved.