trait MessageSink extends AutoCloseable with Flushable

Provides a buffered output stream that writes sequence of WriteBuffer instances.

A Sink implementation has total control of the buffer memory so that it can reuse buffer memory, use buffer pools, or use memory-mapped files.

Linear Supertypes
Flushable, AutoCloseable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MessageSink
  2. Flushable
  3. AutoCloseable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def add(buffer: Array[Byte], offset: Int, length: Int): Unit

    Writes an external payload data.

    Writes an external payload data.

    Unlike int, int) method, the buffer is given - this BufferSink implementation gets ownership of the buffer and may modify contents of the buffer. Contents of this buffer won't be modified by the caller.

    buffer

    the data to add

    offset

    the start offset in the data

    length

    the number of bytes to add

    Annotations
    @throws(scala.this.throws.<init>$default$1[java.io.IOException])
    Exceptions thrown
  2. abstract def close(): Unit
    Definition Classes
    AutoCloseable
    Annotations
    @throws(classOf[java.lang.Exception])
  3. abstract def flush(): Unit
    Definition Classes
    Flushable
    Annotations
    @throws(classOf[java.io.IOException])
  4. abstract def next(minimumSize: Int): WriteBuffer

    Allocates the next buffer for writing MessagePack data.

    Allocates the next buffer for writing MessagePack data.

    This method returns an WriteBuffer instance that has specified size of capacity at least.

    When this method is called twice, the previously returned buffer is no longer used. This method may be called twice without call of writeBuffer(int) in between. In this case, the buffer should be discarded without flushing it to the output.

    minimumSize

    the minimum required buffer size to allocate

    returns

    a Buffer instance with at least minimumSize bytes of capacity

    Annotations
    @throws(scala.this.throws.<init>$default$1[java.io.IOException])
    Exceptions thrown
  5. abstract def write(buffer: Array[Byte], offset: Int, length: Int): Unit

    Writes an external payload data.

    Writes an external payload data. This method should follow semantics of OutputStream.

    buffer

    the data to write

    offset

    the start offset in the data

    length

    the number of bytes to write

    Annotations
    @throws(scala.this.throws.<init>$default$1[java.io.IOException])
    Exceptions thrown
  6. abstract def writeBuffer(length: Int): Unit

    Writes the previously allocated buffer(s).

    Writes the previously allocated buffer(s).

    This method should write the buffer previously returned from next(int) method until specified number of bytes. Once the entire buffer contents is totally written to the sink, the buffer should not be used because a BufferSink implementation might reuse the buffer.

    This method is not always called for each next(int) call. In this case, the buffer should be discarded without flushing it to the output when the next next(int) is called.

    length

    the number of bytes to write

    Annotations
    @throws(scala.this.throws.<init>$default$1[java.io.IOException])
    Exceptions thrown

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

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Flushable

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped