abstract class StreamManager extends AnyRef

The StreamManager is used to fetch individual chunks from a stream. This is used in TransportRequestHandler in order to respond to fetchChunk() requests. Creation of the stream is outside the scope of the transport layer, but a given stream is guaranteed to be read by only one client connection, meaning that getChunk() for a particular stream will be called serially and that once the connection associated with the stream is closed, that stream will never be used again.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StreamManager
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new StreamManager()

Abstract Value Members

  1. abstract def getChunk(streamId: Long, chunkIndex: Int): ManagedBuffer

    Called in response to a fetchChunk() request.

    Called in response to a fetchChunk() request. The returned buffer will be passed as-is to the client. A single stream will be associated with a single TCP connection, so this method will not be called in parallel for a particular stream.

    Chunks may be requested in any order, and requests may be repeated, but it is not required that implementations support this behavior.

    The returned ManagedBuffer will be release()'d after being written to the network.

    streamId

    id of a stream that has been previously registered with the StreamManager.

    chunkIndex

    0-indexed chunk of the stream that's requested

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def checkAuthorization(client: TransportClient, streamId: Long): Unit

    Verify that the client is authorized to read from the given stream.

    Verify that the client is authorized to read from the given stream.

    Exceptions thrown

    SecurityException If client is not authorized.

  6. def chunkBeingSent(streamId: Long): Unit

    Called when start sending a chunk.

  7. def chunkSent(streamId: Long): Unit

    Called when a chunk is successfully sent.

  8. def chunksBeingTransferred(): Long

    Return the number of chunks being transferred and not finished yet in this StreamManager.

  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  10. def connectionTerminated(channel: Channel): Unit

    Indicates that the given channel has been terminated.

    Indicates that the given channel has been terminated. After this occurs, we are guaranteed not to read from the associated streams again, so any state can be cleaned up.

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. def openStream(streamId: String): ManagedBuffer

    Called in response to a stream() request.

    Called in response to a stream() request. The returned data is streamed to the client through a single TCP connection.

    Note the streamId argument is not related to the similarly named argument in the int) method.

    streamId

    id of a stream that has been previously registered with the StreamManager.

    returns

    A managed buffer for the stream, or null if the stream was not found.

  21. def streamBeingSent(streamId: String): Unit

    Called when start sending a stream.

  22. def streamSent(streamId: String): Unit

    Called when a stream is successfully sent.

  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped