Class VariableWidthObjectLocalAppendableColumn<DATA_TYPE>
java.lang.Object
com.illumon.iris.db.tables.appendable.BaseAppendableColumn<DATA_TYPE>
com.illumon.iris.db.tables.appendable.local.LocalAppendableColumn<DATA_TYPE>
com.illumon.iris.db.tables.appendable.local.VariableWidthObjectLocalAppendableColumn<DATA_TYPE>
- All Implemented Interfaces:
AppendableColumn<DATA_TYPE>
,BufferedAppendable
,BufferedAppendableColumn<DATA_TYPE>
,TableTransactionProcessor
- Direct Known Subclasses:
ArrayVariableWidthObjectLocalAppendableColumn
,BufferVariableWidthObjectLocalAppendableColumn
public abstract class VariableWidthObjectLocalAppendableColumn<DATA_TYPE>
extends LocalAppendableColumn<DATA_TYPE>
Non-primitive AppendableColumn for output to a local column location.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.db.tables.appendable.local.LocalAppendableColumn
LocalAppendableColumn.ValueSupplier<DATA_TYPE>
-
Field Summary
Fields inherited from class com.illumon.iris.db.tables.appendable.BaseAppendableColumn
name, type
Fields inherited from interface com.illumon.iris.db.tables.appendable.AppendableColumn
DEFAULT_CHUNK_CAPACITY
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Abort the current pending transaction.final void
addEncoded
(int count, IntFunction<ByteBuffer> valueSupplier) Add pre-encoded values computed on demand from a function over an int value index.void
close()
Flush all appended data to the underlying store, release any resources held, and force all appended data to be persisted to permanent storage.void
Optionally called beforeBufferedAppendable.close()
to release any resources that may be released prior toBufferedAppendable.close()
.void
When recreating our files, we need to make sure that they exist, but we do not need to actually force them to disk durably.void
Finish the current pending transaction.void
flush()
Write all appended data to the underlying store and prepare for subsequent writes.void
force()
Force all flushed data to be persisted to permanent storage.void
release()
Release any resources held.void
Begin a new transaction.Methods inherited from class com.illumon.iris.db.tables.appendable.local.LocalAppendableColumn
addByte, addByte, addBytes, addBytes, addChar, addChar, addChars, addComputed, addDouble, addDouble, addDoubles, addFloat, addFloat, addFloats, addFromBooleanChunk, addFromByteChunk, addFromCharChunk, addFromDoubleChunk, addFromFloatChunk, addFromIntChunk, addFromLongChunk, addFromObjectChunk, addFromShortChunk, addInt, addInt, addInts, addLong, addLong, addLongs, addShort, addShort, addShorts, inTransaction, toString
Methods inherited from class com.illumon.iris.db.tables.appendable.BaseAppendableColumn
add, add, add, addBoolean, addBoolean, addBooleans, checkArrayAddBounds, encodeExternalizable, encodeSerializable, getAddHelper, getName, getType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.tables.appendable.AppendableColumn
add, add, add, addBoolean, addBoolean, addBooleans, addFromArray, addFromBoxedValue, addFromBoxedValue, addFromChunk, addFromChunkSource, addFromChunkSource, addFromChunkSource, addFromColumnSource, addFromColumnSource, addFromColumnSource, addFromColumnSource, addFromDataColumn, getAddHelper, getName, getType
Methods inherited from interface com.illumon.iris.db.tables.appendable.BufferedAppendable
maybeForce, prepareCheckpoint
-
Method Details
-
addEncoded
Description copied from class:LocalAppendableColumn
Add pre-encoded values computed on demand from a function over an int value index. The caller is responsible for ensuring that the encoding is correct.- Overrides:
addEncoded
in classLocalAppendableColumn<DATA_TYPE>
- Parameters:
count
- The number of values to addvalueSupplier
- The value supplier, over domain[0, length)
-
startTransaction
public void startTransaction()Description copied from interface:TableTransactionProcessor
Begin a new transaction. Causes any existing pending transaction to be aborted.- Specified by:
startTransaction
in interfaceTableTransactionProcessor
- Overrides:
startTransaction
in classLocalAppendableColumn<DATA_TYPE>
-
abortTransaction
public void abortTransaction()Description copied from interface:TableTransactionProcessor
Abort the current pending transaction.
This should not be called if there is no current transaction.
- Specified by:
abortTransaction
in interfaceTableTransactionProcessor
- Overrides:
abortTransaction
in classLocalAppendableColumn<DATA_TYPE>
-
finishTransaction
public void finishTransaction()Description copied from interface:TableTransactionProcessor
Finish the current pending transaction.
This makes the rows that were part of the transaction eligible to be made visible and durable, but does not in itself make them visible or durable.
This should not be called if there is no current transaction.
- Specified by:
finishTransaction
in interfaceTableTransactionProcessor
- Overrides:
finishTransaction
in classLocalAppendableColumn<DATA_TYPE>
-
flush
public void flush()Description copied from interface:BufferedAppendable
Write all appended data to the underlying store and prepare for subsequent writes. Does not implyBufferedAppendable.force()
.- Specified by:
flush
in interfaceBufferedAppendable
- Overrides:
flush
in classLocalAppendableColumn<DATA_TYPE>
-
force
public void force()Description copied from interface:BufferedAppendable
Force all flushed data to be persisted to permanent storage. Will consistently and atomically persist the last prepared checkpoint in implementations that implementBufferedAppendable.prepareCheckpoint()
. Does not implyBufferedAppendable.flush()
, as this is a distinct operation in all implementations. May be called concurrently by threads other than the "writing thread".- Specified by:
force
in interfaceAppendableColumn<DATA_TYPE>
- Specified by:
force
in interfaceBufferedAppendable
- Overrides:
force
in classLocalAppendableColumn<DATA_TYPE>
-
ensureFileExists
public void ensureFileExists()Description copied from class:LocalAppendableColumn
When recreating our files, we need to make sure that they exist, but we do not need to actually force them to disk durably.- Overrides:
ensureFileExists
in classLocalAppendableColumn<DATA_TYPE>
-
doneAppending
public void doneAppending()Description copied from interface:BufferedAppendableColumn
Optionally called beforeBufferedAppendable.close()
to release any resources that may be released prior toBufferedAppendable.close()
. No data should be appended after this method is invoked.- Specified by:
doneAppending
in interfaceBufferedAppendableColumn<DATA_TYPE>
- Overrides:
doneAppending
in classLocalAppendableColumn<DATA_TYPE>
-
close
public void close()Description copied from interface:BufferedAppendable
Flush 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:
close
in interfaceAppendableColumn<DATA_TYPE>
- Specified by:
close
in interfaceBufferedAppendable
- Overrides:
close
in classLocalAppendableColumn<DATA_TYPE>
-
release
public void release()Description copied from interface:BufferedAppendable
Release 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:
release
in interfaceBufferedAppendable
- Overrides:
release
in classLocalAppendableColumn<DATA_TYPE>
-