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 runningStreamResultFutures 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 classStreamManager.StreamRateLimiter
-
Field Summary
Fields Modifier and Type Field Description static StreamManagerinstance-
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 voidaddNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)StreamSessionfindSession(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.StreamRateLimitergetRateLimiter(InetAddressAndPort peer)Gets streaming rate limiter.StreamResultFuturegetReceivingStream(java.util.UUID planId)StreamResultFutureregisterFollower(StreamResultFuture result)voidregisterInitiator(StreamResultFuture result)voidremoveNotificationListener(javax.management.NotificationListener listener)voidremoveNotificationListener(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:StreamManagerMBeanReturns the current state of all ongoing streams.- Specified by:
getCurrentStreamsin 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:
addNotificationListenerin interfacejavax.management.NotificationBroadcaster
-
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener) throws javax.management.ListenerNotFoundException- Specified by:
removeNotificationListenerin 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:
removeNotificationListenerin interfacejavax.management.NotificationEmitter- Throws:
javax.management.ListenerNotFoundException
-
getNotificationInfo
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
- Specified by:
getNotificationInfoin interfacejavax.management.NotificationBroadcaster
-
findSession
public StreamSession findSession(InetAddressAndPort peer, java.util.UUID planId, int sessionIndex, boolean searchInitiatorSessions)
-
-