c

com.nvidia.spark.rapids.shuffle

RefCountedDirectByteBuffer

class RefCountedDirectByteBuffer extends AutoCloseable

RefCountedDirectByteBuffer is a simple wrapper on top of a ByteBuffer that has been allocated in direct mode.

The pool is used to return the ByteBuffer to be reused, but not all of these buffers are pooled (hence the argument is optional)

The user should always close a RefCountedDirectByteBuffer. The close could hard destroy the buffer, or return the object to the pool

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RefCountedDirectByteBuffer
  2. AutoCloseable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RefCountedDirectByteBuffer(bb: ByteBuffer, pool: Option[DirectByteBufferPool] = None)

    bb

    buffer to wrap

    pool

    optional pool

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. def acquire(): ByteBuffer

    Adds one to the ref count.

    Adds one to the ref count. Caller should call .close() when done

    returns

    wrapped buffer

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. def close(): Unit

    Decrements the ref count.

    Decrements the ref count. If the ref count reaches 0, the buffer is either returned to the (optional) pool or destroyed.

    Definition Classes
    RefCountedDirectByteBuffer → AutoCloseable
  8. var closed: Boolean
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def getBuffer(): ByteBuffer

    Peeks into the wrapped buffer, without changing the ref count.

    Peeks into the wrapped buffer, without changing the ref count.

    returns

    wrapped buffer

  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def isClosed: Boolean
  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. var refCount: Int
  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    RefCountedDirectByteBuffer → AnyRef → Any
  23. def unsafeDestroy(): Unit

    Destroys the direct byte buffer forcefully, rather than wait for GC to do it later.

    Destroys the direct byte buffer forcefully, rather than wait for GC to do it later. This helps with fragmentation issues with nearly depleted native heap.

  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped