public class TextBooleanReference extends AbstractReference implements net.openhft.chronicle.core.values.BooleanValue
The boolean values ' true' and 'false' are represented internally as
32-bit integers in a specific format. The class also provides methods for
writing the boolean values into BytesStore objects.
bytes, offset| Constructor and Description |
|---|
TextBooleanReference() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getValue()
Get the current value of this reference.
|
long |
maxSize()
Returns the maximum size of the text representation of the boolean value in bytes.
|
void |
setValue(boolean value)
Set the value of this reference.
|
@NotNull String |
toString()
Returns a string representation of this TextBooleanReference object,
displaying the value it represents.
|
static void |
write(boolean value,
BytesStore bytes,
long offset)
Writes a boolean value to the specified
BytesStore at the given offset
in text wire format. |
acceptNewBytesStore, address, bytesStore, 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, warnAndCloseIfNotClosedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static void write(boolean value,
BytesStore bytes,
long offset)
throws IllegalStateException,
BufferOverflowException
BytesStore at the given offset
in text wire format.value - the boolean value to write.bytes - the BytesStore to write to.offset - the offset at which to write the value.BufferOverflowException - If there's not enough space in the buffer to write the value.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 long maxSize()
@NotNull public @NotNull String toString()
toString in class net.openhft.chronicle.core.io.AbstractCloseablepublic boolean getValue()
throws IllegalStateException,
BufferUnderflowException
getValue in interface net.openhft.chronicle.core.values.BooleanValueBufferUnderflowException - If the underlying bytes store cannot provide enough data.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 void setValue(boolean value)
throws IllegalStateException
setValue in interface net.openhft.chronicle.core.values.BooleanValuevalue - the new value.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 wayIllegalStateExceptionCopyright © 2023. All rights reserved.