Packages

abstract class ManagedBuffer extends AnyRef

This interface provides an immutable view for data in the form of bytes. The implementation should specify how the data is provided:

- FileSegmentManagedBuffer: data backed by part of a file - NioManagedBuffer: data backed by a NIO ByteBuffer - NettyManagedBuffer: data backed by a Netty ByteBuf

The concrete buffer implementation might be managed outside the JVM garbage collector. For example, in the case of NettyManagedBuffer, the buffers are reference counted. In that case, if the buffer is going to be passed around to a different thread, retain/release should be called.

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

Instance Constructors

  1. new ManagedBuffer()

Abstract Value Members

  1. abstract def convertToNetty(): AnyRef

    Convert the buffer into a Netty object, used to write the data out.

    Convert the buffer into a Netty object, used to write the data out. The return value is either a io.netty.buffer.ByteBuf or a io.netty.channel.FileRegion.

    If this method returns a ByteBuf, then that buffer's reference count will be incremented and the caller will be responsible for releasing this new reference.

  2. abstract def createInputStream(): InputStream

    Exposes this buffer's data as an InputStream.

    Exposes this buffer's data as an InputStream. The underlying implementation does not necessarily check for the length of bytes read, so the caller is responsible for making sure it does not go over the limit.

  3. abstract def nioByteBuffer(): ByteBuffer

    Exposes this buffer's data as an NIO ByteBuffer.

    Exposes this buffer's data as an NIO ByteBuffer. Changing the position and limit of the returned ByteBuffer should not affect the content of this buffer.

  4. abstract def release(): ManagedBuffer

    If applicable, decrement the reference count by one and deallocates the buffer if the reference count reaches zero.

  5. abstract def retain(): ManagedBuffer

    Increment the reference count by one if applicable.

  6. abstract def size(): Long

    Number of bytes of the data.

    Number of bytes of the data. If this buffer will decrypt for all of the views into the data, this is the size of the decrypted data.

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 clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped