Package org.apache.cassandra.streaming
Class StreamTask
- java.lang.Object
-
- org.apache.cassandra.streaming.StreamTask
-
- Direct Known Subclasses:
StreamReceiveTask,StreamTransferTask
public abstract class StreamTask extends java.lang.ObjectStreamTask is an abstraction of the streaming task performed over specific ColumnFamily.
-
-
Field Summary
Fields Modifier and Type Field Description protected StreamSessionsessionStreamSession that this task belongsprotected TableIdtableId
-
Constructor Summary
Constructors Modifier Constructor Description protectedStreamTask(StreamSession session, TableId tableId)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidabort()Abort the task.StreamSummarygetSummary()abstract intgetTotalNumberOfFiles()abstract longgetTotalSize()
-
-
-
Field Detail
-
session
protected final StreamSession session
StreamSession that this task belongs
-
tableId
protected final TableId tableId
-
-
Constructor Detail
-
StreamTask
protected StreamTask(StreamSession session, TableId tableId)
-
-
Method Detail
-
getTotalNumberOfFiles
public abstract int getTotalNumberOfFiles()
- Returns:
- total number of files this task receives/streams.
-
getTotalSize
public abstract long getTotalSize()
- Returns:
- total bytes expected to receive
-
abort
public abstract void abort()
Abort the task. Subclass should implement cleaning up resources.
-
getSummary
public StreamSummary getSummary()
- Returns:
- StreamSummary that describes this task
-
-