Class StreamManager

  • All Implemented Interfaces:
    javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, StreamManagerMBean

    public class StreamManager
    extends java.lang.Object
    implements StreamManagerMBean
    StreamManager manages currently running StreamResultFutures and provides status of all operation invoked. All stream operations should be created through this class to track streaming status and progress.
    • Constructor Detail

      • StreamManager

        public StreamManager()
    • Method Detail

      • getRateLimiter

        public static StreamManager.StreamRateLimiter getRateLimiter​(InetAddressAndPort peer)
        Gets streaming rate limiter. When stream_throughput_outbound 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.
      • getEntireSSTableRateLimiter

        public static StreamManager.StreamRateLimiter getEntireSSTableRateLimiter​(InetAddressAndPort peer)
        Get streaming rate limiter for entire SSTable operations. When entire_sstable_stream_throughput_outbound is less than or equal ot 0, this returns rate limiter with the rate of Double.MAX_VALUE bytes per second. Rate unit is bytes per sec.
        Parameters:
        peer - the peer location
        Returns:
        StreamManager.StreamRateLimiter with entire SSTable rate limit set based on peer location
      • addStreamingStateAgain

        protected void addStreamingStateAgain​(StreamingState state)
      • start

        public void start()
      • stop

        public void stop()
      • getStreamingStates

        public java.util.Collection<StreamingState> getStreamingStates()
      • putStreamingState

        public void putStreamingState​(StreamingState state)
      • clearStates

        public void clearStates()
      • 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 interface StreamManagerMBean
      • getStreamingStatsEnabled

        public boolean getStreamingStatsEnabled()
        Specified by:
        getStreamingStatsEnabled in interface StreamManagerMBean
        Returns:
        whether the streaming virtual table should collect stats while streaming is running
      • setStreamingStatsEnabled

        public void setStreamingStatsEnabled​(boolean streamingStatsEnabled)
        Description copied from interface: StreamManagerMBean
        enable/disable collection of streaming stats while streaming is running.
        Specified by:
        setStreamingStatsEnabled in interface StreamManagerMBean
      • addNotificationListener

        public void addNotificationListener​(javax.management.NotificationListener listener,
                                            javax.management.NotificationFilter filter,
                                            java.lang.Object handback)
        Specified by:
        addNotificationListener in interface javax.management.NotificationBroadcaster
      • removeNotificationListener

        public void removeNotificationListener​(javax.management.NotificationListener listener)
                                        throws javax.management.ListenerNotFoundException
        Specified by:
        removeNotificationListener in interface javax.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 interface javax.management.NotificationEmitter
        Throws:
        javax.management.ListenerNotFoundException
      • getNotificationInfo

        public javax.management.MBeanNotificationInfo[] getNotificationInfo()
        Specified by:
        getNotificationInfo in interface javax.management.NotificationBroadcaster
      • getTotalRemainingOngoingBytes

        public long getTotalRemainingOngoingBytes()