Package org.apache.cassandra.repair
Class StreamingRepairTask
- java.lang.Object
-
- org.apache.cassandra.repair.StreamingRepairTask
-
- All Implemented Interfaces:
com.google.common.util.concurrent.FutureCallback<StreamState>
,java.lang.Runnable
,StreamEventHandler
public class StreamingRepairTask extends java.lang.Object implements java.lang.Runnable, StreamEventHandler
StreamingRepairTask performs data streaming between two remote replicas, neither of which is repair coordinator. Task will sendSyncResponse
message back to coordinator upon streaming completion.
-
-
Constructor Summary
Constructors Constructor Description StreamingRepairTask(SharedContext ctx, SyncState state, RepairJobDesc desc, InetAddressAndPort initiator, InetAddressAndPort src, InetAddressAndPort dst, java.util.Collection<Range<Token>> ranges, TimeUUID pendingRepair, PreviewKind previewKind, boolean asymmetric)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleStreamEvent(StreamEvent event)
Callback for various streaming events.void
onFailure(java.lang.Throwable t)
If we failed on either stream in or out, respond fail to coordinatorvoid
onSuccess(StreamState state)
If we succeeded on both stream in and out, respond back to coordinatorvoid
run()
-
-
-
Constructor Detail
-
StreamingRepairTask
public StreamingRepairTask(SharedContext ctx, SyncState state, RepairJobDesc desc, InetAddressAndPort initiator, InetAddressAndPort src, InetAddressAndPort dst, java.util.Collection<Range<Token>> ranges, TimeUUID pendingRepair, PreviewKind previewKind, boolean asymmetric)
-
-
Method Detail
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
handleStreamEvent
public void handleStreamEvent(StreamEvent event)
Description copied from interface:StreamEventHandler
Callback for various streaming events.- Specified by:
handleStreamEvent
in interfaceStreamEventHandler
- Parameters:
event
- Stream event.- See Also:
StreamEvent.Type
-
onSuccess
public void onSuccess(StreamState state)
If we succeeded on both stream in and out, respond back to coordinator- Specified by:
onSuccess
in interfacecom.google.common.util.concurrent.FutureCallback<StreamState>
-
onFailure
public void onFailure(java.lang.Throwable t)
If we failed on either stream in or out, respond fail to coordinator- Specified by:
onFailure
in interfacecom.google.common.util.concurrent.FutureCallback<StreamState>
-
-