Package org.apache.cassandra.streaming
Class StreamReceiveTask
java.lang.Object
org.apache.cassandra.streaming.StreamTask
org.apache.cassandra.streaming.StreamReceiveTask
Task that manages receiving files for the session for certain ColumnFamily.
-
Field Summary
Fields inherited from class org.apache.cassandra.streaming.StreamTask
session, tableId -
Constructor Summary
ConstructorsConstructorDescriptionStreamReceiveTask(StreamSession session, TableId tableId, int totalStreams, long totalSize) -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()Abort this task.intlongvoidreceived(IncomingStream stream) Process received stream.static voidshutdownAndWait(long timeout, TimeUnit unit) Methods inherited from class org.apache.cassandra.streaming.StreamTask
getSummary
-
Constructor Details
-
StreamReceiveTask
-
-
Method Details
-
received
Process received stream.- Parameters:
stream- Stream received.
-
getTotalNumberOfFiles
public int getTotalNumberOfFiles()- Specified by:
getTotalNumberOfFilesin classStreamTask- Returns:
- total number of files this task receives/streams.
-
getTotalSize
public long getTotalSize()- Specified by:
getTotalSizein classStreamTask- Returns:
- total bytes expected to receive
-
getReceiver
-
abort
public void abort()Abort this task. If the task already received all files andStreamReceiveTask.OnCompletionRunnabletask is submitted, then task cannot be aborted.- Specified by:
abortin classStreamTask
-
shutdownAndWait
public static void shutdownAndWait(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException - Throws:
InterruptedExceptionTimeoutException
-