org.apache.cassandra.streaming

## Class StreamInSession

- java.lang.Object
- - org.apache.cassandra.streaming.AbstractStreamSession
  - - org.apache.cassandra.streaming.StreamInSession

- All Implemented Interfaces:
    IEndpointStateChangeSubscriber, IFailureDetectionEventListener

      public class StreamInSession
      extends AbstractStreamSession

  each context gets its own StreamInSession. So there may be >1 Session per host

- - ### Field Summary

    - ### Fields inherited from class org.apache.cassandra.streaming.AbstractStreamSession

      `callback, host, sessionId, table`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addFiles(java.util.Collection<PendingFile> files)`
    `void` | `closeIfFinished()`
    `protected void` | `closeInternal(boolean success)`
    `static StreamInSession` | `create(java.net.InetAddress host, IStreamCallback callback)`
    `void` | `finished(PendingFile remoteFile, SSTableWriter writer)`
    `static StreamInSession` | `get(java.net.InetAddress host, java.util.UUID sessionId)`
    `static java.util.Set<PendingFile>` | `getIncomingFiles(java.net.InetAddress host)` query the status of incoming files.
    `static java.util.Set<java.net.InetAddress>` | `getSources()` query method to determine which hosts are streaming to this node.
    `static boolean` | `hasSession(java.util.UUID sessionId)`
    `void` | `retry(PendingFile remoteFile)`
    `void` | `sendMessage(MessageOut<StreamReply> message)`
    `void` | `setCurrentFile(PendingFile file)`
    `void` | `setSocket(java.net.Socket socket)`
    `void` | `setTable(java.lang.String table)`

    - ### Methods inherited from class org.apache.cassandra.streaming.AbstractStreamSession

      `close, convict, getHost, getSessionId, onAlive, onChange, onDead, onJoin, onRemove, onRestart`

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

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

- - ### Method Detail

    - #### create

          public static StreamInSession create(java.net.InetAddress host,
                               IStreamCallback callback)

    - #### get

          public static StreamInSession get(java.net.InetAddress host,
                            java.util.UUID sessionId)

    - #### hasSession

          public static boolean hasSession(java.util.UUID sessionId)

    - #### setCurrentFile

          public void setCurrentFile(PendingFile file)

    - #### setTable

          public void setTable(java.lang.String table)

    - #### setSocket

          public void setSocket(java.net.Socket socket)

    - #### addFiles

          public void addFiles(java.util.Collection<PendingFile> files)

    - #### finished

          public void finished(PendingFile remoteFile,
                      SSTableWriter writer)
                        throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### retry

          public void retry(PendingFile remoteFile)

    - #### sendMessage

          public void sendMessage(MessageOut<StreamReply> message)
                           throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### closeIfFinished

          public void closeIfFinished()
                               throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### closeInternal

          protected void closeInternal(boolean success)

      Specified by:
        `closeInternal` in class `AbstractStreamSession`

    - #### getSources

          public static java.util.Set<java.net.InetAddress> getSources()

      query method to determine which hosts are streaming to this node.

    - #### getIncomingFiles

          public static java.util.Set<PendingFile> getIncomingFiles(java.net.InetAddress host)

      query the status of incoming files.

Copyright © 2014 The Apache Software Foundation