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

org.apache.cassandra.streaming

## Class StreamCoordinator

- java.lang.Object
- - org.apache.cassandra.streaming.StreamCoordinator

-     public class StreamCoordinator
      extends java.lang.Object

  `StreamCoordinator` is a helper class that abstracts away maintaining multiple StreamSession and ProgressInfo instances per peer. This class coordinates multiple SessionStreams per peer in both the outgoing StreamPlan context and on the inbound StreamResultFuture context.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StreamCoordinator(int connectionsPerHost, StreamConnectionFactory factory)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addSessionInfo(SessionInfo session)`
    `void` | `connectAllStreamSessions()`
    `java.util.Set<SessionInfo>` | `getAllSessionInfo()`
    `java.util.Collection<StreamSession>` | `getAllStreamSessions()`
    `StreamSession` | `getOrCreateNextSession(java.net.InetAddress peer, java.net.InetAddress connecting)`
    `StreamSession` | `getOrCreateSessionById(java.net.InetAddress peer, int id, java.net.InetAddress connecting)`
    `java.util.Set<java.net.InetAddress>` | `getPeers()`
    `boolean` | `hasActiveSessions()`
    `boolean` | `isReceiving()`
    `void` | `setConnectionFactory(StreamConnectionFactory factory)`
    `void` | `transferFiles(java.net.InetAddress to, java.util.Collection<StreamSession.SSTableStreamingSections> sstableDetails)`
    `void` | `updateProgress(ProgressInfo info)`

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

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

- - ### Constructor Detail

    - #### StreamCoordinator

          public StreamCoordinator(int connectionsPerHost,
                           StreamConnectionFactory factory)

  - ### Method Detail

    - #### setConnectionFactory

          public void setConnectionFactory(StreamConnectionFactory factory)

    - #### hasActiveSessions

          public boolean hasActiveSessions()

      Returns:
        true if any stream session is active

    - #### getAllStreamSessions

          public java.util.Collection<StreamSession> getAllStreamSessions()

    - #### isReceiving

          public boolean isReceiving()

    - #### connectAllStreamSessions

          public void connectAllStreamSessions()

    - #### getPeers

          public java.util.Set<java.net.InetAddress> getPeers()

    - #### getOrCreateNextSession

          public StreamSession getOrCreateNextSession(java.net.InetAddress peer,
                                             java.net.InetAddress connecting)

    - #### getOrCreateSessionById

          public StreamSession getOrCreateSessionById(java.net.InetAddress peer,
                                             int id,
                                             java.net.InetAddress connecting)

    - #### updateProgress

          public void updateProgress(ProgressInfo info)

    - #### addSessionInfo

          public void addSessionInfo(SessionInfo session)

    - #### getAllSessionInfo

          public java.util.Set<SessionInfo> getAllSessionInfo()

    - #### transferFiles

          public void transferFiles(java.net.InetAddress to,
                           java.util.Collection<StreamSession.SSTableStreamingSections> sstableDetails)

Copyright © 2014 The Apache Software Foundation