Class OutboundTransferTask

  • All Implemented Interfaces:
    java.lang.Runnable

    public class OutboundTransferTask
    extends java.lang.Object
    implements java.lang.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 Detail

      • OutboundTransferTask

        public OutboundTransferTask​(Address destination,
                                    IntSet segments,
                                    int segmentCount,
                                    int chunkSize,
                                    int topologyId,
                                    KeyPartitioner keyPartitioner,
                                    java.util.function.Consumer<OutboundTransferTask> onCompletion,
                                    java.util.function.Consumer<java.util.List<StateChunk>> onChunkReplicated,
                                    java.util.function.BiFunction<InternalCacheEntry,​org.infinispan.container.impl.InternalEntryFactory,​InternalCacheEntry> mapEntryFromDataContainer,
                                    java.util.function.BiFunction<MarshalledEntry,​org.infinispan.container.impl.InternalEntryFactory,​InternalCacheEntry> mapEntryFromStore,
                                    org.infinispan.container.impl.InternalDataContainer dataContainer,
                                    PersistenceManager persistenceManager,
                                    RpcManager rpcManager,
                                    org.infinispan.commands.CommandsFactory commandsFactory,
                                    org.infinispan.container.impl.InternalEntryFactory ef,
                                    long timeout,
                                    java.lang.String cacheName,
                                    boolean applyState,
                                    boolean pushTransfer)
    • Method Detail

      • execute

        public void execute​(java.util.concurrent.ExecutorService executorService)
      • getDestination

        public Address getDestination()
      • getSegments

        public IntSet getSegments()
      • getTopologyId

        public int getTopologyId()
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • cancelSegments

        public void cancelSegments​(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()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • defaultMapEntryFromDataContainer

        public static InternalCacheEntry defaultMapEntryFromDataContainer​(InternalCacheEntry ice,
                                                                          org.infinispan.container.impl.InternalEntryFactory entryFactory)
      • defaultMapEntryFromStore

        public static InternalCacheEntry defaultMapEntryFromStore​(MarshalledEntry me,
                                                                  org.infinispan.container.impl.InternalEntryFactory entryFactory)