public class BinaryBooleanReference extends AbstractReference implements net.openhft.chronicle.core.values.BooleanValue
This class encapsulates a reference to a boolean value stored in binary form. It provides
functionality to read and write a boolean value to/from a BytesStore.
BytesStore,
BooleanValuebytes, offset| Constructor and Description |
|---|
BinaryBooleanReference() |
| Modifier and Type | Method and Description |
|---|---|
void |
bytesStore(@NotNull BytesStore bytes,
long offset,
long length)
Sets the underlying BytesStore to work with, along with the offset and length.
|
boolean |
getValue()
Reads a boolean value from the bytes store.
|
long |
maxSize()
Returns the maximum size of the byte representation of a boolean value.
|
void |
setValue(boolean flag)
Writes a boolean value to the bytes store.
|
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, toString, unmonitor, waitForCloseablesToClose, waitForClosed, warnAndCloseIfNotClosedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic void bytesStore(@NotNull
@NotNull BytesStore bytes,
long offset,
long length)
throws IllegalStateException,
IllegalArgumentException,
BufferOverflowException
bytesStore in interface ByteablebytesStore in class AbstractReferencebytes - the BytesStore to setoffset - the offset to setlength - the length to setIllegalArgumentException - If the arguments are invalidBufferOverflowException - If the provided buffer is too smallnet.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()
public boolean getValue()
throws IllegalStateException,
BufferUnderflowException
getValue in interface net.openhft.chronicle.core.values.BooleanValueBufferUnderflowException - If the bytes store contains insufficient datanet.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 flag)
throws IllegalStateException
setValue in interface net.openhft.chronicle.core.values.BooleanValueflag - The boolean value to writenet.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.