public class TextIntReference extends AbstractReference implements net.openhft.chronicle.core.values.IntValue
The 34-byte layout embeds a CAS-based lock.
FALSE and TRUE store the lock field.
Debug-only; avoid on performance critical paths.
bytesStore, offset| Constructor and Description |
|---|
TextIntReference() |
| Modifier and Type | Method and Description |
|---|---|
int |
addAtomicValue(int delta) |
int |
addValue(int delta) |
void |
bytesStore(@NotNull BytesStore bytes,
long offset,
long length)
Sets the underlying
BytesStore together with the offset and length. |
boolean |
compareAndSwapValue(int expected,
int value) |
int |
getValue()
Retrieves the 32-bit integer value from the Text wire format.
|
int |
getVolatileValue() |
long |
maxSize() |
void |
setOrderedValue(int value) |
void |
setValue(int value)
Sets the 32-bit integer value in the Text wire format.
|
@NotNull String |
toString()
Returns the string representation of the TextIntReference.
|
static void |
write(@NotNull Bytes<?> bytes,
int value)
Writes the provided 32-bit integer value into the given Bytes instance in Text wire format.
|
acceptNewBytesStore, address, bytesStore, lock, offset, performClose, tryLock, unmonitorassertCloseable, assertCloseablesClosed, close, createdHere, disableCloseableTracing, enableCloseableTracing, gcAndWaitForCloseablesToClose, isClosed, isClosing, isInUserThread, referenceId, shouldPerformCloseInBackground, shouldWaitForClosed, singleThreadedCheckDisabled, singleThreadedCheckDisabled, singleThreadedCheckReset, threadSafetyCheck, throwExceptionIfClosed, throwExceptionIfClosedInSetter, waitForCloseablesToClose, waitForClosed, warnAndCloseIfNotClosedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static void write(@NotNull
@NotNull Bytes<?> bytes,
int value)
throws BufferOverflowException,
IllegalStateException
bytes - the Bytes instance to write to.value - the 32-bit integer value to be written.BufferOverflowException - If there is insufficient space.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe wayIllegalStateExceptionpublic int getValue()
throws IllegalStateException
getValue in interface net.openhft.chronicle.core.values.IntValuenet.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe wayIllegalStateExceptionpublic void setValue(int value)
throws IllegalStateException
setValue in interface net.openhft.chronicle.core.values.IntValuevalue - the 32-bit integer value to be set.net.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe wayIllegalStateExceptionpublic int getVolatileValue()
throws IllegalStateException
getVolatileValue in interface net.openhft.chronicle.core.values.IntValueIllegalStateExceptionpublic void setOrderedValue(int value)
throws IllegalStateException
setOrderedValue in interface net.openhft.chronicle.core.values.IntValueIllegalStateExceptionpublic int addValue(int delta)
throws IllegalStateException
addValue in interface net.openhft.chronicle.core.values.IntValueIllegalStateExceptionpublic int addAtomicValue(int delta)
throws IllegalStateException
addAtomicValue in interface net.openhft.chronicle.core.values.IntValueIllegalStateExceptionpublic boolean compareAndSwapValue(int expected,
int value)
throws IllegalStateException
compareAndSwapValue in interface net.openhft.chronicle.core.values.IntValueIllegalStateExceptionpublic void bytesStore(@NotNull
@NotNull BytesStore bytes,
long offset,
long length)
throws IllegalStateException,
IllegalArgumentException,
BufferOverflowException
AbstractReferenceBytesStore together with the offset and length.bytesStore in interface ByteablebytesStore in class AbstractReferencebytes - the BytesStore providing the backing memoryoffset - the non-negative offset within the storelength - the number of bytes this reference spansnet.openhft.chronicle.core.io.ClosedIllegalStateException - if the store is closednet.openhft.chronicle.core.io.ThreadingIllegalStateException - if accessed from the wrong threadIllegalArgumentException - if length does not match Byteable.maxSize()BufferOverflowException - if the region exceeds the store capacityIllegalStateExceptionpublic long maxSize()
@NotNull public @NotNull String toString()
toString in class net.openhft.chronicle.core.io.AbstractCloseableCopyright © 2026 Chronicle Software Ltd. All rights reserved.