Package com.qfs.chunk
Interface IConcurrentChunkLong
- All Superinterfaces:
IArray,IArrayReader,IArrayWriter,IChunk<Long>,IChunkLong,IMemoryMonitored,IWritableArray
- All Known Implementing Classes:
ArrayChunkLong,ArrayChunkLongNullable,DirectChunkLong
An
IChunkLong that supports some additional operations that are relevant for concurrent
programming.- Author:
- ActiveViam
-
Field Summary
Fields inherited from interface com.qfs.chunk.IChunk
NO_SIZE_LIMIT -
Method Summary
Modifier and TypeMethodDescriptionbooleancompareAndSet(int position, long expectedValue, long updatedValue) Atomically sets the given position of this chunk to the given updated value if the current value stored at this position equals the expected value.longreadLongVolatile(int position) Reads alongprimitive value from this chunk in a volatile fashion.voidwriteLongVolatile(int position, long value) Writes alongprimitive value in this chunk in a volatile fashion.Methods inherited from interface com.qfs.chunk.IArrayReader
isNull, readBoolean, readInt, readVectorMethods inherited from interface com.qfs.chunk.IArrayWriter
addDouble, addFloat, addInt, addLong, writeBoolean, writeDouble, writeFloatMethods inherited from interface com.qfs.chunk.IChunk
capacity, compress, createArrayCursor, destroy, findRowsEqualTo, findRowsEqualTo, findRowsEqualTo, findRowsInSet, findRowsInSet, findRowsInSet, findRowsInTransactionEqualTo, findRowsInTransactionEqualTo, findRowsInTransactionEqualTo, findRowsInTransactionInSet, findRowsInTransactionInSet, findRowsInTransactionInSet, freeRow, getChunkCreatorForSparse, getChunkId, getChunkType, getPhysicalSize, isDead, localRow, replaceBy, reset, sparseChunkCompressionMethods inherited from interface com.qfs.chunk.IChunkLong
copyInto, createFrequentValueChunk, equals, fill, getBindingType, isPrimitive, read, readDouble, readFloat, readLong, transfer, write, writeFromCell, writeInt, writeLongMethods inherited from interface com.qfs.monitoring.memory.IMemoryMonitored
getMemoryStatistic
-
Method Details
-
writeLongVolatile
void writeLongVolatile(int position, long value) Writes alongprimitive value in this chunk in a volatile fashion.- Parameters:
position- the position to write the value tovalue- the value to write- See Also:
-
readLongVolatile
long readLongVolatile(int position) Reads alongprimitive value from this chunk in a volatile fashion.An exception will be thrown if the value is not of the right type.
- Parameters:
position- the position to read the value from- Returns:
- the value stored at the given position
- See Also:
-
compareAndSet
boolean compareAndSet(int position, long expectedValue, long updatedValue) Atomically sets the given position of this chunk to the given updated value if the current value stored at this position equals the expected value.- Parameters:
position- the position to updateexpectedValue- the expected valueupdatedValue- the new value- Returns:
trueif successful, orfalseif the actual value was not equal to the expected value
-