Package com.qfs.chunk
Interface IConcurrentChunkInteger
-
- All Superinterfaces:
IArray,IArrayReader,IArrayWriter,IChunk<Integer>,IChunkInteger,IMemoryMonitored,IWritableArray
- All Known Implementing Classes:
ArrayChunkInteger,ArrayChunkIntegerNullable,DirectChunkInteger
public interface IConcurrentChunkInteger extends IChunkInteger
AnIChunkIntegerthat 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancompareAndSet(int position, int expectedValue, int 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.intreadIntVolatile(int position)Reads anintprimitive value from this chunk in a volatile fashion.voidwriteIntVolatile(int position, int value)Writes anintprimitive value in this chunk in a volatile fashion.-
Methods inherited from interface com.qfs.chunk.IArrayReader
isNull, readBoolean, readVector
-
Methods inherited from interface com.qfs.chunk.IArrayWriter
addDouble, addFloat, addInt, addLong, writeBoolean, writeDouble, writeFloat, writeLong
-
Methods 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, sparseChunkCompression
-
Methods inherited from interface com.qfs.chunk.IChunkInteger
copyInto, createFrequentValueChunk, equals, fill, getBindingType, getOrder, isPrimitive, read, readDouble, readFloat, readInt, readLong, transfer, write, writeFromCell, writeInt
-
Methods inherited from interface com.qfs.monitoring.memory.IMemoryMonitored
getMemoryStatistic
-
-
-
-
Method Detail
-
writeIntVolatile
void writeIntVolatile(int position, int value)Writes anintprimitive value in this chunk in a volatile fashion.- Parameters:
position- the position to write the value tovalue- the value to write- See Also:
IChunkInteger.writeInt(int, int)
-
readIntVolatile
int readIntVolatile(int position)
Reads anintprimitive 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:
IChunkInteger.readInt(int)
-
compareAndSet
boolean compareAndSet(int position, int expectedValue, int 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
-
-