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 and Description |
---|
StreamCoordinator(int connectionsPerHost) |
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) |
StreamSession |
getOrCreateSessionById(java.net.InetAddress peer,
int id) |
java.util.Set<java.net.InetAddress> |
getPeers() |
boolean |
hasActiveSessions() |
void |
transferFiles(java.net.InetAddress to,
java.util.Collection<StreamSession.SSTableStreamingSections> sstableDetails) |
void |
updateProgress(ProgressInfo info) |
public boolean hasActiveSessions()
public java.util.Collection<StreamSession> getAllStreamSessions()
public void connectAllStreamSessions()
public java.util.Set<java.net.InetAddress> getPeers()
public StreamSession getOrCreateNextSession(java.net.InetAddress peer)
public StreamSession getOrCreateSessionById(java.net.InetAddress peer, int id)
public void updateProgress(ProgressInfo info)
public void addSessionInfo(SessionInfo session)
public java.util.Set<SessionInfo> getAllSessionInfo()
public void transferFiles(java.net.InetAddress to, java.util.Collection<StreamSession.SSTableStreamingSections> sstableDetails)
Copyright © 2014 The Apache Software Foundation