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 StateProvider
public CompletableFuture<Void> onTopologyUpdate(CacheTopology cacheTopology, boolean isRebalance)
StateProvider
onTopologyUpdate
in interface StateProvider
public void start()
start
in interface StateProvider
public void stop()
StateProvider
stop
in interface StateProvider
public CompletionStage<List<TransactionInfo>> getTransactionsForSegments(Address destination, int requestTopologyId, IntSet segments)
StateProvider
StateTransferGetTransactionsCommand
.getTransactionsForSegments
in interface StateProvider
destination
- 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 StateProvider
public void startOutboundTransfer(Address destination, int requestTopologyId, IntSet segments, boolean applyState)
StateProvider
StateTransferStartCommand
.
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 StateProvider
destination
- 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)
StateProvider
StateTransferCancelCommand
.cancelOutboundTransfer
in interface StateProvider
destination
- 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 © 2021 JBoss by Red Hat. All rights reserved.