Class OpaqueMemoryResource<T>
- java.lang.Object
-
- io.streamthoughts.azkarra.commons.rocksdb.internal.OpaqueMemoryResource<T>
-
- Type Parameters:
T
- the resource type.
- All Implemented Interfaces:
AutoCloseable
public class OpaqueMemoryResource<T> extends Object implements AutoCloseable
AnOpaqueMemoryResource
represents a shared memory resource.
-
-
Constructor Summary
Constructors Constructor Description OpaqueMemoryResource(T resource, ResourceDisposer<Exception> disposer)
Creates a newOpaqueMemoryResource
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Releases this resource.T
getResource()
Gets the handle resource.
-
-
-
Constructor Detail
-
OpaqueMemoryResource
public OpaqueMemoryResource(T resource, ResourceDisposer<Exception> disposer)
Creates a newOpaqueMemoryResource
instance.- Parameters:
resource
- the resource to handle.disposer
- theResourceDisposer
to be used for releasing the resource.
-
-
Method Detail
-
getResource
public T getResource()
Gets the handle resource.
-
close
public void close() throws Exception
Releases this resource.- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
-