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)`

### Method Summary

Methods
`void` `addSessionInfo(SessionInfo session)`
`void` `connectAllStreamSessions()`
`java.util.Set<SessionInfo>` `getAllSessionInfo()`
`java.util.Collection<StreamSession>` `getAllStreamSessions()`
`StreamSession` `getOrCreateNextSession(java.net.InetAddress peer)`
`StreamSession` `getOrCreateSessionById(java.net.InetAddress peer, int id)`
`java.util.Set<java.net.InetAddress>` `getPeers()`
`boolean` `hasActiveSessions()`
`boolean` `isReceiving()`
`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)

### Method Detail

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

#### getOrCreateSessionById

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

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