public final class InMemoryCursorStreamProvider extends AbstractCursorStreamProvider
AbstractCursorStreamProvider
which yields
cursors that only use memory for bufferingwrappedStream
LOCATION_KEY, ROOT_CONTAINER_NAME_KEY
ANNOTATIONS_PROPERTY_NAME
Constructor and Description |
---|
InMemoryCursorStreamProvider(InputStream wrappedStream,
InMemoryCursorStreamConfig config,
ByteBufferManager bufferManager)
Creates a new instance
|
Modifier and Type | Method and Description |
---|---|
protected CursorStream |
doOpenCursor() |
void |
releaseResources()
Releases all the resources currently held by this provider.
|
close, isClosed, openCursor
getAnnotation, getAnnotations, getLocation, getRootContainerLocation, setAnnotations
public InMemoryCursorStreamProvider(InputStream wrappedStream, InMemoryCursorStreamConfig config, ByteBufferManager bufferManager)
wrappedStream
- the stream to buffer fromconfig
- the config of the generated bufferbufferManager
- the ByteBufferManager
that will be used to allocate all buffersprotected CursorStream doOpenCursor()
doOpenCursor
in class AbstractCursorStreamProvider
public void releaseResources()
cursors
generated by
this
provider will cease to function, which means that this method should only be invoked once
the CursorProvider.close()
has already been invoked (to prevent new cursors from being opened) and all the current ones
have already been released.
This method should ONLY be invoked by the runtime
Copyright © 2018. All rights reserved.