Class BaseAppendableColumn<TYPE>
java.lang.Object
com.illumon.iris.db.tables.appendable.BaseAppendableColumn<TYPE>
- All Implemented Interfaces:
AppendableColumn<TYPE>
- Direct Known Subclasses:
LocalAppendableColumn,StreamAppendableColumn
public abstract class BaseAppendableColumn<TYPE> extends Object implements AppendableColumn<TYPE>
Base class for AppendableColumn implementations.
-
Field Summary
Fields inherited from interface com.illumon.iris.db.tables.appendable.AppendableColumn
DEFAULT_CHUNK_CAPACITY -
Constructor Summary
Constructors Constructor Description BaseAppendableColumn(String name, Class<TYPE> type) -
Method Summary
Modifier and Type Method Description voidadd(TYPE value)Append a DATA_TYPE to this column.voidadd(TYPE[] values, int startIndex, int length)Add DATA_TYPE values from an array.voidadd(TYPE value, long count)Append a DATA_TYPE to this columncounttimes.voidaddBoolean(Boolean value)Append a Boolean to this column.voidaddBoolean(Boolean value, long count)Append a Boolean to this columncounttimes.voidaddBooleans(Boolean[] values, int startIndex, int length)Add Boolean values from an array.protected static voidcheckArrayAddBounds(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.AppendableColumnAddHelper<TYPE>getAddHelper()Get a type-appropriate helper instance for complex append operations.StringgetName()The name of this column in the enclosing table.Class<TYPE>getType()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
-
Constructor Details
-
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:AppendableColumnThe name of this column in the enclosing table.- Specified by:
getNamein interfaceAppendableColumn<TYPE>- Returns:
- The name of this column
-
getType
- Specified by:
getTypein interfaceAppendableColumn<TYPE>- Returns:
- the type of object contained within this column.
-
getAddHelper
Description copied from interface:AppendableColumnGet a type-appropriate helper instance for complex append operations.- Specified by:
getAddHelperin interfaceAppendableColumn<TYPE>- Returns:
- An add-helper for this column
-
addBoolean
Description copied from interface:AppendableColumnAppend a Boolean to this column.- Specified by:
addBooleanin interfaceAppendableColumn<TYPE>- Parameters:
value- The value to append
-
addBoolean
Description copied from interface:AppendableColumnAppend a Boolean to this columncounttimes.- Specified by:
addBooleanin interfaceAppendableColumn<TYPE>- Parameters:
value- The value to appendcount- The number of times to append the value
-
addBooleans
Description copied from interface:AppendableColumnAdd Boolean values from an array.- Specified by:
addBooleansin 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:AppendableColumnAppend a DATA_TYPE to this column.- Specified by:
addin interfaceAppendableColumn<TYPE>- Parameters:
value- The value to append
-
add
Description copied from interface:AppendableColumnAppend a DATA_TYPE to this columncounttimes.- Specified by:
addin interfaceAppendableColumn<TYPE>- Parameters:
value- The value to appendcount- The number of times to append the value
-
add
Description copied from interface:AppendableColumnAdd DATA_TYPE values from an array.- Specified by:
addin interfaceAppendableColumn<TYPE>- Parameters:
values- The array of valuesstartIndex- The index of the first value to addlength- The total number of values to add
-