StreamTask (apache-cassandra API)
Date: 2014-10-21

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 and Description
    --- | ---
    `protected java.util.UUID` | `cfId`
    `protected StreamSession` | `session` StreamSession that this task belongs

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `StreamTask(StreamSession session, java.util.UUID cfId)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `abort()` Abort the task.
    `StreamSummary` | `getSummary()`
    `abstract int` | `getTotalNumberOfFiles()`
    `abstract long` | `getTotalSize()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### session

          protected final StreamSession session

      StreamSession that this task belongs

    - #### cfId

          protected final java.util.UUID cfId

  - ### Constructor Detail

    - #### StreamTask

          protected StreamTask(StreamSession session,
                    java.util.UUID cfId)

  - ### 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

Copyright © 2014 The Apache Software Foundation