public class InboundTransferTask extends Object
Constructor and Description |
---|
InboundTransferTask(IntSet segments,
Address source,
int topologyId,
RpcManager rpcManager,
CommandsFactory commandsFactory,
long timeout,
String cacheName,
boolean applyState) |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels all the segments and marks them as finished, sends a cancel command, then completes the task.
|
void |
cancelSegments(IntSet cancelledSegments)
Cancels a set of segments and marks them as finished.
|
IntSet |
getSegments()
Returns a copy of segments currently tied to this task
|
Address |
getSource() |
IntSet |
getUnfinishedSegments() |
boolean |
isCancelled() |
boolean |
isCompletedSuccessfully() |
void |
onStateReceived(int segmentId,
boolean isLastChunk) |
CompletionStage<Void> |
requestKeys() |
CompletionStage<Void> |
requestSegments()
Send START_STATE_TRANSFER request to source node.
|
void |
terminate()
Terminate abruptly regardless if the segments were received or not.
|
String |
toString() |
public InboundTransferTask(IntSet segments, Address source, int topologyId, RpcManager rpcManager, CommandsFactory commandsFactory, long timeout, String cacheName, boolean applyState)
public IntSet getSegments()
public IntSet getUnfinishedSegments()
public Address getSource()
public CompletionStage<Void> requestSegments()
CompletableFuture
that completes when the transfer is done.public CompletionStage<Void> requestKeys()
public void cancelSegments(IntSet cancelledSegments)
cancelledSegments
- the segments to be cancelledpublic void cancel()
public boolean isCancelled()
public void onStateReceived(int segmentId, boolean isLastChunk)
public boolean isCompletedSuccessfully()
public void terminate()
Copyright © 2021 JBoss by Red Hat. All rights reserved.