Class BaseAppendableColumn<TYPE>
java.lang.Object
com.illumon.iris.db.tables.appendable.BaseAppendableColumn<TYPE>
- All Implemented Interfaces:
AppendableColumn<TYPE>
- Direct Known Subclasses:
LocalAppendableColumn
,StreamAppendableColumn
Base class for AppendableColumn implementations.
-
Field Summary
FieldsFields inherited from interface com.illumon.iris.db.tables.appendable.AppendableColumn
DEFAULT_CHUNK_CAPACITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Append a DATA_TYPE to this column.final void
Add DATA_TYPE values from an array.final void
Append a DATA_TYPE to this columncount
times.final void
addBoolean
(Boolean value) Append a Boolean to this column.final void
addBoolean
(Boolean value, long count) Append a Boolean to this columncount
times.final void
addBooleans
(Boolean[] values, int startIndex, int length) Add Boolean values from an array.protected static void
checkArrayAddBounds
(int arrayLength, int startIndex, int length) protected static <VALUE_TYPE extends Externalizable>
byte[]encodeExternalizable
(VALUE_TYPE value) protected static <VALUE_TYPE>
byte[]encodeSerializable
(VALUE_TYPE value) Encode a value of a (assumed to be) serializable type.Get a type-appropriate helper instance for complex append operations.getName()
The name of this column in the enclosing table.getType()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.tables.appendable.AppendableColumn
addByte, addByte, addBytes, addBytes, addChar, addChar, addChars, addDouble, addDouble, addDoubles, addFloat, addFloat, addFloats, addFromArray, addFromBooleanChunk, addFromBoxedValue, addFromBoxedValue, addFromByteChunk, addFromCharChunk, addFromChunk, addFromChunkSource, addFromChunkSource, addFromChunkSource, addFromColumnSource, addFromColumnSource, addFromColumnSource, addFromColumnSource, addFromDataColumn, addFromDoubleChunk, addFromFloatChunk, addFromIntChunk, addFromLongChunk, addFromObjectChunk, addFromShortChunk, addInt, addInt, addInts, addLong, addLong, addLongs, addShort, addShort, addShorts, close, force
-
Field Details
-
name
-
type
-
-
Constructor Details
-
BaseAppendableColumn
-
-
Method Details
-
checkArrayAddBounds
protected static void checkArrayAddBounds(int arrayLength, int startIndex, int length) -
encodeSerializable
protected static <VALUE_TYPE> byte[] encodeSerializable(@NotNull VALUE_TYPE value) Encode a value of a (assumed to be) serializable type.- Parameters:
value
- The value to encode- Returns:
- The value's serialized bytes
-
encodeExternalizable
protected static <VALUE_TYPE extends Externalizable> byte[] encodeExternalizable(@NotNull VALUE_TYPE value) -
getName
Description copied from interface:AppendableColumn
The name of this column in the enclosing table.- Specified by:
getName
in interfaceAppendableColumn<TYPE>
- Returns:
- The name of this column
-
getType
- Specified by:
getType
in interfaceAppendableColumn<TYPE>
- Returns:
- the type of object contained within this column.
-
getAddHelper
Description copied from interface:AppendableColumn
Get a type-appropriate helper instance for complex append operations.- Specified by:
getAddHelper
in interfaceAppendableColumn<TYPE>
- Returns:
- An add-helper for this column
-
addBoolean
Description copied from interface:AppendableColumn
Append a Boolean to this column.- Specified by:
addBoolean
in interfaceAppendableColumn<TYPE>
- Parameters:
value
- The value to append
-
addBoolean
Description copied from interface:AppendableColumn
Append a Boolean to this columncount
times.- Specified by:
addBoolean
in interfaceAppendableColumn<TYPE>
- Parameters:
value
- The value to appendcount
- The number of times to append the value
-
addBooleans
Description copied from interface:AppendableColumn
Add Boolean values from an array.- Specified by:
addBooleans
in interfaceAppendableColumn<TYPE>
- Parameters:
values
- The array of valuesstartIndex
- The index of the first value to addlength
- The total number of values to add
-
add
Description copied from interface:AppendableColumn
Append a DATA_TYPE to this column.- Specified by:
add
in interfaceAppendableColumn<TYPE>
- Parameters:
value
- The value to append
-
add
Description copied from interface:AppendableColumn
Append a DATA_TYPE to this columncount
times.- Specified by:
add
in interfaceAppendableColumn<TYPE>
- Parameters:
value
- The value to appendcount
- The number of times to append the value
-
add
Description copied from interface:AppendableColumn
Add DATA_TYPE values from an array.- Specified by:
add
in interfaceAppendableColumn<TYPE>
- Parameters:
values
- The array of valuesstartIndex
- The index of the first value to addlength
- The total number of values to add
-