public class TextIntReference extends AbstractReference implements net.openhft.chronicle.core.values.IntValue
The format of the text representation is:
!!atomic { locked: false, value: 0000000000 }
bytes, 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 to work with, along 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()
Returns the maximum size in bytes that this reference can point to.
|
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, tryLockassertCloseable, assertCloseablesClosed, clearUsedByThread, close, createdHere, disableCloseableTracing, disableThreadSafetyCheck, disableThreadSafetyCheck, enableCloseableTracing, gcAndWaitForCloseablesToClose, isClosed, isClosing, isInUserThread, referenceId, resetUsedByThread, shouldPerformCloseInBackground, shouldWaitForClosed, singleThreadedCheckDisabled, singleThreadedCheckDisabled, singleThreadedCheckReset, threadSafetyCheck, throwExceptionIfClosed, throwExceptionIfClosedInSetter, unmonitor, waitForCloseablesToClose, waitForClosed, warnAndCloseIfNotClosedpublic 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 in interface ByteablebytesStore in class AbstractReferencebytes - the BytesStore to setoffset - the offset to setlength - the length to setnet.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 wayIllegalArgumentException - If the arguments are invalidBufferOverflowException - If the provided buffer is too smallIllegalStateExceptionpublic long maxSize()
Byteable@NotNull public @NotNull String toString()
toString in class net.openhft.chronicle.core.io.AbstractCloseableCopyright © 2023. All rights reserved.