Package org.infinispan.statetransfer
Class OutboundTransferTask
- java.lang.Object
-
- org.infinispan.statetransfer.OutboundTransferTask
-
- All Implemented Interfaces:
Runnable
public class OutboundTransferTask extends Object implements Runnable
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, org.infinispan.commons.util.IntSet segments, int segmentCount, int chunkSize, int topologyId, KeyPartitioner keyPartitioner, Consumer<OutboundTransferTask> onCompletion, Consumer<List<StateChunk>> onChunkReplicated, BiFunction<InternalCacheEntry,InternalEntryFactory,InternalCacheEntry> mapEntryFromDataContainer, BiFunction<MarshalledEntry,InternalEntryFactory,InternalCacheEntry> mapEntryFromStore, InternalDataContainer dataContainer, PersistenceManager persistenceManager, RpcManager rpcManager, CommandsFactory commandsFactory, InternalEntryFactory ef, long timeout, String cacheName, boolean applyState, boolean pushTransfer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
Cancel the whole task.void
cancelSegments(org.infinispan.commons.util.IntSet cancelledSegments)
Cancel some of the segments.static InternalCacheEntry
defaultMapEntryFromDataContainer(InternalCacheEntry ice, InternalEntryFactory entryFactory)
static InternalCacheEntry
defaultMapEntryFromStore(MarshalledEntry me, InternalEntryFactory entryFactory)
void
execute(ExecutorService executorService)
Address
getDestination()
org.infinispan.commons.util.IntSet
getSegments()
int
getTopologyId()
boolean
isCancelled()
void
run()
String
toString()
-
-
-
Constructor Detail
-
OutboundTransferTask
public OutboundTransferTask(Address destination, org.infinispan.commons.util.IntSet segments, int segmentCount, int chunkSize, int topologyId, KeyPartitioner keyPartitioner, Consumer<OutboundTransferTask> onCompletion, Consumer<List<StateChunk>> onChunkReplicated, BiFunction<InternalCacheEntry,InternalEntryFactory,InternalCacheEntry> mapEntryFromDataContainer, BiFunction<MarshalledEntry,InternalEntryFactory,InternalCacheEntry> mapEntryFromStore, InternalDataContainer dataContainer, PersistenceManager persistenceManager, RpcManager rpcManager, CommandsFactory commandsFactory, InternalEntryFactory ef, long timeout, String cacheName, boolean applyState, boolean pushTransfer)
-
-
Method Detail
-
execute
public void execute(ExecutorService executorService)
-
getDestination
public Address getDestination()
-
getSegments
public org.infinispan.commons.util.IntSet getSegments()
-
getTopologyId
public int getTopologyId()
-
cancelSegments
public void cancelSegments(org.infinispan.commons.util.IntSet cancelledSegments)
Cancel some of the segments. If all segments get cancelled then the whole task will be cancelled.- Parameters:
cancelledSegments
- segments to cancel.
-
cancel
public void cancel()
Cancel the whole task.
-
isCancelled
public boolean isCancelled()
-
defaultMapEntryFromDataContainer
public static InternalCacheEntry defaultMapEntryFromDataContainer(InternalCacheEntry ice, InternalEntryFactory entryFactory)
-
defaultMapEntryFromStore
public static InternalCacheEntry defaultMapEntryFromStore(MarshalledEntry me, InternalEntryFactory entryFactory)
-
-