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
AnOpaqueMemoryResourcerepresents a shared memory resource.
-
-
Constructor Summary
Constructors Constructor Description OpaqueMemoryResource(T resource, ResourceDisposer<Exception> disposer)Creates a newOpaqueMemoryResourceinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Releases this resource.TgetResource()Gets the handle resource.
-
-
-
Constructor Detail
-
OpaqueMemoryResource
public OpaqueMemoryResource(T resource, ResourceDisposer<Exception> disposer)
Creates a newOpaqueMemoryResourceinstance.- Parameters:
resource- the resource to handle.disposer- theResourceDisposerto be used for releasing the resource.
-
-
Method Detail
-
getResource
public T getResource()
Gets the handle resource.
-
close
public void close() throws ExceptionReleases this resource.- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-