Class BoundedAppendableSymbolManager<STRING_LIKE_TYPE>
java.lang.Object
com.illumon.iris.db.tables.appendable.symbolmanagers.AppendableSymbolManager<STRING_LIKE_TYPE>
com.illumon.iris.db.tables.appendable.symbolmanagers.BoundedAppendableSymbolManager<STRING_LIKE_TYPE>
- All Implemented Interfaces:
BufferedAppendable,SymbolManager<STRING_LIKE_TYPE>
public class BoundedAppendableSymbolManager<STRING_LIKE_TYPE>
extends AppendableSymbolManager<STRING_LIKE_TYPE>
A symbol manager that manages a bounded number of cached mappings, with least-recently-added replacement.
-
Constructor Summary
ConstructorsConstructorDescriptionBoundedAppendableSymbolManager(BufferedAppendableColumn<STRING_LIKE_TYPE> symbolsColumn, int maximumCachedMappings, Table existingSymbols) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Flush all appended data to the underlying store, release any resources held, and force all appended data to be persisted to permanent storage.voidSeeBufferedAppendableColumn.doneAppending()for reference.intgetSymbolId(STRING_LIKE_TYPE symbol) Get an integer identifier for value.voidrelease()Release any resources held.Methods inherited from class com.illumon.iris.db.tables.appendable.symbolmanagers.AppendableSymbolManager
ensureFileExists, flush, force, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.illumon.iris.db.tables.appendable.BufferedAppendable
maybeForce, prepareCheckpoint
-
Constructor Details
-
BoundedAppendableSymbolManager
public BoundedAppendableSymbolManager(@NotNull BufferedAppendableColumn<STRING_LIKE_TYPE> symbolsColumn, int maximumCachedMappings, @Nullable Table existingSymbols)
-
-
Method Details
-
getSymbolId
Description copied from interface:SymbolManagerGet an integer identifier for value. Implementations must guarantee that id to value mappings are one:one or many:one.- Parameters:
symbol- The value to map- Returns:
- An integer identifier for value
-
doneAppending
public void doneAppending()Description copied from class:AppendableSymbolManagerSeeBufferedAppendableColumn.doneAppending()for reference.- Overrides:
doneAppendingin classAppendableSymbolManager<STRING_LIKE_TYPE>
-
close
public void close()Description copied from interface:BufferedAppendableFlush all appended data to the underlying store, release any resources held, and force all appended data to be persisted to permanent storage. This should be the final access to this appendable (if successful) with the exception of any asynchronousBufferedAppendable.force()operations. ABufferedAppendable.release()is appropriate afterwards, especially on error.- Specified by:
closein interfaceBufferedAppendable- Overrides:
closein classAppendableSymbolManager<STRING_LIKE_TYPE>
-
release
public void release()Description copied from interface:BufferedAppendableRelease any resources held. Called after an error in preparation for termination. For external callers, this should be done as the final access to this column with the exception of any asynchronousBufferedAppendable.force()operations.- Specified by:
releasein interfaceBufferedAppendable- Overrides:
releasein classAppendableSymbolManager<STRING_LIKE_TYPE>
-