Package org.infinispan.statetransfer
Class OutboundTransferTask
- java.lang.Object
-
- org.infinispan.statetransfer.OutboundTransferTask
-
public class OutboundTransferTask extends java.lang.Object
Outbound state transfer task. Pushes data segments to another cluster member on request. Instances of OutboundTransferTask are created and managed by StateTransferManagerImpl. There should be at most one such task per destination at any time.- Since:
- 5.2
- Author:
- anistor@redhat.com
-
-
Constructor Summary
Constructors Constructor Description OutboundTransferTask(Address destination, IntSet segments, int segmentCount, int chunkSize, int topologyId, KeyPartitioner keyPartitioner, java.util.function.Consumer<java.util.Collection<StateChunk>> onChunkReplicated, RpcManager rpcManager, org.infinispan.commands.CommandsFactory commandsFactory, long timeout, java.lang.String cacheName, boolean applyState, boolean pushTransfer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
Cancel the whole task.java.util.concurrent.CompletionStage<java.lang.Void>
execute(io.reactivex.Flowable<InternalCacheEntry<java.lang.Object,java.lang.Object>> entries)
Starts sending entries from the data container and the first loader with fetch persistent data enabled to the target node.Address
getDestination()
IntSet
getSegments()
int
getTopologyId()
boolean
isCancelled()
java.lang.String
toString()
-
-
-
Constructor Detail
-
OutboundTransferTask
public OutboundTransferTask(Address destination, IntSet segments, int segmentCount, int chunkSize, int topologyId, KeyPartitioner keyPartitioner, java.util.function.Consumer<java.util.Collection<StateChunk>> onChunkReplicated, RpcManager rpcManager, org.infinispan.commands.CommandsFactory commandsFactory, long timeout, java.lang.String cacheName, boolean applyState, boolean pushTransfer)
-
-
Method Detail
-
getDestination
public Address getDestination()
-
getSegments
public IntSet getSegments()
-
getTopologyId
public int getTopologyId()
-
execute
public java.util.concurrent.CompletionStage<java.lang.Void> execute(io.reactivex.Flowable<InternalCacheEntry<java.lang.Object,java.lang.Object>> entries)
Starts sending entries from the data container and the first loader with fetch persistent data enabled to the target node.- Parameters:
entries
- aFlowable
with all the entries that need to be sent- Returns:
- a completion stage that completes when all the entries have been sent.
-
cancel
public void cancel()
Cancel the whole task.
-
isCancelled
public boolean isCancelled()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-