Class OpaqueMemoryResource<T>

  • All Implemented Interfaces:
    AutoCloseable

    public final class OpaqueMemoryResource<T>
    extends Object
    implements AutoCloseable
    An opaque memory resource, meaning a memory resource not understood by Flink or the JVM. An example for this is a native resource, like RocksDB's block cache memory pool.

    The resource must be closed after it is not used any more.

    • Constructor Detail

      • OpaqueMemoryResource

        public OpaqueMemoryResource​(T resourceHandle,
                                    long size,
                                    org.apache.flink.util.function.ThrowingRunnable<Exception> disposer)
    • Method Detail

      • getResourceHandle

        public T getResourceHandle()
        Gets the handle to the resource.
      • getSize

        public long getSize()
        Gets the size, in bytes.