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.Object
StreamTask is an abstraction of the streaming task performed over specific ColumnFamily.
-
-
Field Summary
Fields Modifier and Type Field Description protected StreamSession
session
StreamSession that this task belongsprotected TableId
tableId
-
Constructor Summary
Constructors Modifier Constructor Description protected
StreamTask(StreamSession session, TableId tableId)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
abort()
Abort the task.StreamSummary
getSummary()
abstract int
getTotalNumberOfFiles()
abstract long
getTotalSize()
-
-
-
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
-
-