Package org.apache.cassandra.streaming
Class StreamManager
- java.lang.Object
-
- org.apache.cassandra.streaming.StreamManager
-
- All Implemented Interfaces:
javax.management.NotificationBroadcaster
,javax.management.NotificationEmitter
,StreamManagerMBean
public class StreamManager extends java.lang.Object implements StreamManagerMBean
StreamManager manages currently runningStreamResultFuture
s and provides status of all operation invoked. All stream operation should be created through this class to track streaming status and progress.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StreamManager.StreamRateLimiter
-
Field Summary
Fields Modifier and Type Field Description static StreamManager
instance
-
Fields inherited from interface org.apache.cassandra.streaming.StreamManagerMBean
OBJECT_NAME
-
-
Constructor Summary
Constructors Constructor Description StreamManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
StreamSession
findSession(InetAddressAndPort peer, java.util.UUID planId, int sessionIndex, boolean searchInitiatorSessions)
java.util.Set<javax.management.openmbean.CompositeData>
getCurrentStreams()
Returns the current state of all ongoing streams.javax.management.MBeanNotificationInfo[]
getNotificationInfo()
static StreamManager.StreamRateLimiter
getRateLimiter(InetAddressAndPort peer)
Gets streaming rate limiter.StreamResultFuture
getReceivingStream(java.util.UUID planId)
StreamResultFuture
registerFollower(StreamResultFuture result)
void
registerInitiator(StreamResultFuture result)
void
removeNotificationListener(javax.management.NotificationListener listener)
void
removeNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
-
-
-
Field Detail
-
instance
public static final StreamManager instance
-
-
Method Detail
-
getRateLimiter
public static StreamManager.StreamRateLimiter getRateLimiter(InetAddressAndPort peer)
Gets streaming rate limiter. When stream_throughput_outbound_megabits_per_sec is 0, this returns rate limiter with the rate of Double.MAX_VALUE bytes per second. Rate unit is bytes per sec.- Returns:
- StreamRateLimiter with rate limit set based on peer location.
-
getCurrentStreams
public java.util.Set<javax.management.openmbean.CompositeData> getCurrentStreams()
Description copied from interface:StreamManagerMBean
Returns the current state of all ongoing streams.- Specified by:
getCurrentStreams
in interfaceStreamManagerMBean
-
registerInitiator
public void registerInitiator(StreamResultFuture result)
-
registerFollower
public StreamResultFuture registerFollower(StreamResultFuture result)
-
getReceivingStream
public StreamResultFuture getReceivingStream(java.util.UUID planId)
-
addNotificationListener
public void addNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
- Specified by:
addNotificationListener
in interfacejavax.management.NotificationBroadcaster
-
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener) throws javax.management.ListenerNotFoundException
- Specified by:
removeNotificationListener
in interfacejavax.management.NotificationBroadcaster
- Throws:
javax.management.ListenerNotFoundException
-
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws javax.management.ListenerNotFoundException
- Specified by:
removeNotificationListener
in interfacejavax.management.NotificationEmitter
- Throws:
javax.management.ListenerNotFoundException
-
getNotificationInfo
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
- Specified by:
getNotificationInfo
in interfacejavax.management.NotificationBroadcaster
-
findSession
public StreamSession findSession(InetAddressAndPort peer, java.util.UUID planId, int sessionIndex, boolean searchInitiatorSessions)
-
-