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 operation 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_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 interface StreamManagerMBean
      • 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 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