Package org.apache.cassandra.streaming
Class StreamCoordinator
java.lang.Object
org.apache.cassandra.streaming.StreamCoordinator
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
ConstructorsConstructorDescriptionStreamCoordinator(StreamOperation streamOperation, int connectionsPerHost, StreamingChannel.Factory factory, boolean follower, boolean connectSequentially, TimeUUID pendingRepair, PreviewKind previewKind) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSessionInfo(SessionInfo session) voidconnect(StreamResultFuture future) getOrCreateInboundSession(InetAddressAndPort from, StreamingChannel channel, int messagingVersion, int id) getPeers()getSessionById(InetAddressAndPort peer, int id) booleanbooleanvoidvoidtransferStreams(InetAddressAndPort to, Collection<OutgoingStream> streams) voidupdateProgress(ProgressInfo info)
-
Constructor Details
-
StreamCoordinator
public StreamCoordinator(StreamOperation streamOperation, int connectionsPerHost, StreamingChannel.Factory factory, boolean follower, boolean connectSequentially, TimeUUID pendingRepair, PreviewKind previewKind)
-
-
Method Details
-
setConnectionFactory
-
hasActiveSessions
public boolean hasActiveSessions()- Returns:
- true if any stream session is active
-
getAllStreamSessions
-
isFollower
public boolean isFollower() -
connect
-
getPeers
-
getOrCreateOutboundSession
-
getOrCreateInboundSession
public StreamSession getOrCreateInboundSession(InetAddressAndPort from, StreamingChannel channel, int messagingVersion, int id) -
getSessionById
-
updateProgress
-
addSessionInfo
-
getAllSessionInfo
-
transferStreams
-
getPendingRepair
-