public class ChunkedMappedBytes extends CommonMappedBytes
NOTE These Bytes are single Threaded as are all Bytes.
lastActualSize, mappedFile
TRACE
bytesStore, DISABLE_THREAD_SAFETY, isPresent, readPosition, writeLimit
referenceCounted, WARN_COUNT, WARN_NS
DEFAULT_BYTE_BUFFER_CAPACITY, MAX_CAPACITY, MAX_HEAP_CAPACITY
charToString
JAVA9_STRING_CODER_LATIN, JAVA9_STRING_CODER_UTF16
Modifier | Constructor and Description |
---|---|
|
ChunkedMappedBytes(@NotNull MappedFile mappedFile) |
protected |
ChunkedMappedBytes(@NotNull MappedFile mappedFile,
String name) |
Modifier and Type | Method and Description |
---|---|
long |
addressForRead(long offset)
This single-argument version of the call returns an address which is guaranteed safe for a contiguous
read up to the overlap size.
|
long |
addressForRead(long offset,
int bufferSize)
This two-argument version of the call returns an address which is guaranteed safe for a contiguous
read up to the requested buffer size.
|
long |
addressForWrite(long offset)
Retrieves the underlying memory address for writing.
|
@NotNull Bytes<Void> |
appendUtf8(char[] chars,
int offset,
int length)
Appends a UTF-8 encoded CharSequence to this output stream from a specific offset and length.
|
@NotNull Bytes<Void> |
clear()
Clears the content of this Bytes object and resets its state.
|
boolean |
compareAndSwapLong(long offset,
long expected,
long value)
Perform a 64-bit CAS at a given offset.
|
void |
ensureCapacity(long desiredCapacity)
Ensures that this Bytes object has the capacity to accommodate the specified amount of data.
|
boolean |
isElastic()
Checks if this Bytes object is elastic, meaning it can dynamically resize when more data is written
than its current
Bytes.realCapacity() . |
int |
peekUnsignedByte()
Peeks (reads without moving the read pointer) the next unsigned byte from the input stream.
|
int |
peekUnsignedByte(long offset)
Reads an unsigned byte value from a specific offset.
|
int |
peekVolatileInt()
Reads a volatile int value from the current reading position.
|
protected void |
readCheckOffset(long offset,
long adding,
boolean given) |
@NotNull Bytes<Void> |
readPosition(long position)
Sets the read position of this StreamingDataInput.
|
@NotNull Bytes<Void> |
readPositionRemaining(long position,
long remaining)
Sets the read position and limit of this StreamingDataInput based on the specified position and remaining values.
|
@NotNull Bytes<Void> |
readSkip(long bytesToSkip)
Skips the specified number of bytes by advancing the read position.
|
byte |
readVolatileByte(long offset)
Reads a volatile 8-bit byte value from a specified offset.
|
int |
readVolatileInt(long offset)
Reads a volatile 32-bit integer value from a specified offset.
|
long |
readVolatileLong(long offset)
Reads a volatile 64-bit long value from a specified offset.
|
short |
readVolatileShort(long offset)
Reads a volatile 16-bit short value from a specified offset.
|
@NotNull Bytes<Void> |
write(@NotNull BytesStore bytes,
long offset,
long length)
Writes the specified number of bytes from the provided
BytesStore into the output stream,
starting from the given read offset. |
@NotNull ChunkedMappedBytes |
write(long offsetInRDO,
byte[] byteArray,
int offset,
int length)
Copies the provided
byteArray to this Bytes object starting at writeOffset taking
content starting at readOffset but copying at most length bytes. |
@NotNull ChunkedMappedBytes |
write(long writeOffset,
@NotNull RandomDataInput bytes,
long readOffset,
long length)
Copies a segment from the provided RandomDataInput into this data output.
|
protected void |
writeCheckOffset(long offset,
long adding) |
@NotNull Bytes<Void> |
writeSkip(long bytesToSkip)
Skips a specified number of bytes from the current write position in the data stream.
|
append8bit, appendUtf8, capacity, chunkCount, close, copy, disableThreadSafetyCheck, isBackingFileReadOnly, isClosed, isDirectMemory, mappedFile, performRelease, read8bit, readLimitToCapacity, readStopBit, readStopBitChar, readWrite, realCapacity, realReadRemaining, realWriteRemaining, release, releaseLast, singleThreadedCheckDisabled, singleThreadedCheckReset, start, throwExceptionIfClosed, toString, warnAndCloseIfNotClosed, write, write, write, write, write8bit, writePosition, writeStopBit, writeStopBit, writeUtf8, writeUtf8
bytesForRead, bytesForWrite, mappedBytes, mappedBytes, mappedBytes, mappedBytes, mappedBytes, mappedBytes, readOnly, sharedMemory, singleMappedBytes, singleMappedBytes, singleMappedBytes, sync
acquireUncheckedInput, addressForWritePosition, append, append, append, append, append, append, appendAndReturnLength, byteCheckSum, byteCheckSum, byteCheckSum, bytesStore, bytesStore, canReadDirect, canWriteDirect, clearAndPad, compact, compareAndSwapInt, copyTo, decimaliser, decimaliser, equals, fpAppend0, fpAppend0, hashCode, internalNumberBuffer, isImmutableEmptyByteStore, lastDecimalPlaces, lastDecimalPlaces, lastNumberHadDigits, lastNumberHadDigits, length, lenient, lenient, move, nativeRead, nativeWrite, prewrite, prewrite, prewriteByte, prewriteInt, prewriteLong, prewriteOffsetPositionMoved, prewriteShort, read, read, readByte, readByte, readDouble, readDouble, readFloat, readFloat, readInt, readInt, readLimit, readLimit, readLong, readLong, readOffsetPositionMoved, readPosition, readPositionForHeader, readShort, readShort, readUnsignedByte, readUnsignedByte, readVolatileInt, readVolatileLong, safeCopySize, startsWith, testAndSetInt, uncheckedReadSkipBackOne, uncheckedReadSkipOne, uncheckedReadUnsignedByte, uncheckedWritePosition, underlyingObject, write, write, write8bit, write8bit, write8bit, write8bit, writeBoolean, writeByte, writeByte, writeDouble, writeDouble, writeDoubleAndInt, writeFloat, writeFloat, writeInt, writeInt, writeIntAdv, writeLimit, writeLimit, writeLong, writeLong, writeLongAdv, writeOffsetPositionMoved, writeOffsetPositionMoved, writeOrderedInt, writeOrderedInt, writeOrderedLong, writeOrderedLong, writePosition, writeShort, writeShort, writeSome, writeVolatileByte, writeVolatileInt, writeVolatileLong, writeVolatileShort
addReferenceChangeListener, assertReferencesReleased, backgroundPerformRelease, canReleaseInBackground, clearUsedByThread, createdHere, disableReferenceTracing, enableReferenceTracing, refCount, referenceCountedUnmonitored, referenceId, removeReferenceChangeListener, reserve, reservedBy, reserveTransfer, threadSafetyCheck, throwExceptionIfNotReleased, throwExceptionIfReleased, tryReserve, unmonitor, warnAndReleaseIfNotReleased
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
allocateDirect, allocateDirect, allocateElasticDirect, allocateElasticDirect, allocateElasticOnHeap, allocateElasticOnHeap, copyTo, copyTo, directFrom, elasticByteBuffer, elasticByteBuffer, elasticByteBuffer, elasticHeapByteBuffer, elasticHeapByteBuffer, empty, forFieldGroup, from, from, fromDirect, fromHexString, indexOf, indexOf, isClear, isEqual, readMarshallableLength16, readWithLength, safeLimit, toHexString, toHexString, toHexString, toString, toString, toString, unchecked, unchecked, unwrite, valueOf, wrapForRead, wrapForRead, wrapForWrite, wrapForWrite, write, writeMarshallableLength16
addAndGetDouble, addAndGetDoubleNotAtomic, addAndGetFloat, addAndGetFloatNotAtomic, addAndGetInt, addAndGetIntNotAtomic, addAndGetLong, addAndGetShortNotAtomic, addAndGetUnsignedByteNotAtomic, charAt, cipher, cipher, compareAndSwapDouble, compareAndSwapFloat, contentEquals, elasticByteBuffer, endsWith, equalBytes, follow, forFields, from, hash, inside, inside, isEmpty, isEqual, lazyNativeBytesStoreWithFixedCapacity, nativePointer, nativeStore, nativeStoreFrom, nativeStoreWithFixedCapacity, startsWith, subSequence, to8bitString, toDebugString, toDebugString, wrap, wrap, wrap, writeMaxInt, writeMaxLong, zeroOut
append, append, write, write, writeBoolean, writeByte, writeInt24, writeOrderedDouble, writeOrderedFloat, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort, writeUtf8, writeUtf8Limited, writeVolatileDouble, writeVolatileFloat
chars, codePoints
bytesMethodReader, bytesMethodReaderBuilder, readObject
canReadDirect, compareUtf8, copyTo, createCharToString, fastHash, findByte, parseLong, printable, readBoolean, readIncompleteLong, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8Limited, readUtf8Limited, readVolatileDouble, readVolatileFloat, subBytes, toByteArray, toTemporaryDirectByteBuffer
parse8bit, parse8bit, parse8bit, parse8bit, parse8bit, parseBigDecimal, parseBoolean, parseBoolean, parseDouble, parseFlexibleLong, parseFloat, parseInt, parseLong, parseLongDecimal, parseUtf8, parseUtf8, parseUtf8, reader, skipTo
inputStream, parseHexLong, parseUtf8, parseUtf8, rawReadByte, rawReadInt, rawReadLong, read, read, read, read, read, read8bit, read8bit, readBigDecimal, readBigInteger, readBoolean, readChar, readEnum, readHistogram, readIncompleteLong, readInt24, readPositionUnlimited, readStopBitDecimal, readStopBitDouble, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8, readUtf8, readUtf8, readWithLength, readWithLength, readWithLength0, unsafeRead, unsafeReadObject, unsafeReadObject
bytesMethodWriter, writeObject
append, append, append, append, append, append8bit, append8bit, append8bit, append8bit, appendBase, appendBase16, appendBase16, appendDateMillis, appendDecimal, appendTimeMillis, writer
appendUtf8, appendUtf8, appendUtf8, appendUtf8, copyFrom, outputStream, rawWriteByte, rawWriteInt, rawWriteLong, unsafeWrite, unsafeWriteObject, unsafeWriteObject, write, write, write, write8bit, write8bit, writeBigDecimal, writeBigInteger, writeChar, writeEnum, writeHistogram, writeInt24, writePositionForHeader, writePositionRemaining, writeSome, writeStopBit, writeStopBitDecimal, writeUnsignedByte, writeUnsignedInt, writeUnsignedInt24, writeUnsignedShort, writeWithLength
prepend
adjustHexDumpIndentation, retainedHexDumpDescription, writeHexDumpDescription
public ChunkedMappedBytes(@NotNull @NotNull MappedFile mappedFile) throws net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
net.openhft.chronicle.core.io.ClosedIllegalStateException
net.openhft.chronicle.core.io.ThreadingIllegalStateException
protected ChunkedMappedBytes(@NotNull @NotNull MappedFile mappedFile, String name) throws net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
net.openhft.chronicle.core.io.ClosedIllegalStateException
net.openhft.chronicle.core.io.ThreadingIllegalStateException
@NotNull public @NotNull ChunkedMappedBytes write(long offsetInRDO, byte[] byteArray, int offset, int length) throws net.openhft.chronicle.core.io.ClosedIllegalStateException, BufferOverflowException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
RandomDataOutput
byteArray
to this Bytes object starting at writeOffset
taking
content starting at readOffset
but copying at most length
bytes.
Does not update cursors e.g. writePosition()
write
in interface RandomDataOutput<Bytes<Void>>
write
in class AbstractBytes<Void>
offsetInRDO
- the non-negative offset within the data output where the segment should be written.byteArray
- the byte array containing the segment to be written.offset
- the non-negative offset within the byte array where the segment begins.length
- the non-negative length of the segment.net.openhft.chronicle.core.io.ClosedIllegalStateException
- If the resource has been released or closed.BufferOverflowException
- If the capacity of this data output was exceeded.net.openhft.chronicle.core.io.ThreadingIllegalStateException
- If this resource was accessed by multiple threads in an unsafe way@NotNull public @NotNull ChunkedMappedBytes write(long writeOffset, @NotNull @NotNull RandomDataInput bytes, long readOffset, long length) throws BufferOverflowException, BufferUnderflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
RandomDataOutput
writePosition()
of this output nor the RandomCommon.readPosition()
of the input.write
in interface RandomDataOutput<Bytes<Void>>
write
in class AbstractBytes<Void>
writeOffset
- the non-negative offset within this data output where the segment should be written.bytes
- the RandomDataInput source containing the segment to be written.readOffset
- the non-negative offset within the source where the segment begins.length
- the non-negative length of the segment.BufferOverflowException
- If the capacity of this data output was exceeded.BufferUnderflowException
- If the source does not have enough data to fill the length.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 way@NotNull public @NotNull Bytes<Void> readPositionRemaining(long position, long remaining) throws BufferUnderflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
StreamingDataInput
position
- the new read position, must be non-negativeremaining
- the remaining size, which is used to set the read limitBufferUnderflowException
- If the new position is greater than the read limitnet.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 way@NotNull public @NotNull Bytes<Void> readPosition(long position) throws BufferUnderflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
StreamingDataInput
readPosition
in interface StreamingDataInput<Bytes<Void>>
readPosition
in class AbstractBytes<Void>
position
- the new read position, must be non-negativeBufferUnderflowException
- If the new position is greater than the limitnet.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 waypublic long addressForRead(long offset) throws BufferUnderflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
NOTE: If called with an offset which is already in the overlap region this call will therefore prompt a remapping to the new segment, which in turn may unmap the current segment. Any other handles using data in the current segment may therefore result in a memory violation when next used.
If manipulating offsets which may reside in the overlap region, always use the 2-argument version below
addressForRead
in class AbstractBytes<Void>
offset
- within this buffer. addressForRead(start()) is the actual addressForRead of the first byte.BufferUnderflowException
- If the offset is before the start() or the after the capacity()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 waypublic long addressForRead(long offset, int bufferSize) throws UnsupportedOperationException, BufferUnderflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
NOTE: In contrast to the single-argument version this call will not prompt a remapping if called within the overlap region (provided the full extent remains in the overlap region)
This version is therefore safe to use cooperatively with other handles in a defined sequence of bytes (eg returned from a DocumentContext) regardless of whether the handles span the overlap region
offset
- The offset within this buffer.bufferSize
- The buffer index.UnsupportedOperationException
- If the underlying buffer is on the heap.BufferUnderflowException
- If the offset is before the start or after the capacity.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 waypublic long addressForWrite(long offset) throws UnsupportedOperationException, BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
addressForWrite
in class AbstractBytes<Void>
offset
- within this buffer. addressForRead(start()) is the actual addressForRead of the first byte.UnsupportedOperationException
- If the underlying buffer is on the heapBufferOverflowException
- If the offset is before the start() or the after the capacity()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 wayprotected void readCheckOffset(long offset, long adding, boolean given) throws BufferUnderflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
readCheckOffset
in class AbstractBytes<Void>
BufferUnderflowException
net.openhft.chronicle.core.io.ClosedIllegalStateException
net.openhft.chronicle.core.io.ThreadingIllegalStateException
protected void writeCheckOffset(long offset, long adding) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
writeCheckOffset
in class AbstractBytes<Void>
BufferOverflowException
net.openhft.chronicle.core.io.ClosedIllegalStateException
net.openhft.chronicle.core.io.ThreadingIllegalStateException
public void ensureCapacity(long desiredCapacity) throws IllegalArgumentException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
Bytes
If this Bytes object is elastic and doesn't have enough capacity, it will be resized. If it is not
elastic and doesn't have enough capacity, a DecoratedBufferOverflowException
will be thrown.
desiredCapacity
- The minimum capacity, in bytes, that is required.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 wayIllegalArgumentException
@NotNull public @NotNull Bytes<Void> writeSkip(long bytesToSkip) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
StreamingDataOutput
writeSkip
in interface StreamingDataOutput<Bytes<Void>>
writeSkip
in class CommonMappedBytes
bytesToSkip
- The number of bytes to skip. This can be a negative number to move the
position backward.BufferOverflowException
- If the new position calculated by the skip operation falls
outside the limits of the data buffer.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 way@NotNull public @NotNull Bytes<Void> readSkip(long bytesToSkip) throws BufferUnderflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
StreamingDataInput
readSkip
in interface StreamingDataInput<Bytes<Void>>
readSkip
in class AbstractBytes<Void>
bytesToSkip
- the number of bytes to skipBufferUnderflowException
- If the new read position is outside the limits of the data sourcenet.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 way@NotNull public @NotNull Bytes<Void> clear() throws net.openhft.chronicle.core.io.ClosedIllegalStateException
Bytes
clear
in interface Bytes<Void>
clear
in interface StreamingCommon<Bytes<Void>>
clear
in class CommonMappedBytes
net.openhft.chronicle.core.io.ClosedIllegalStateException
- If the resource has been released or closed.public boolean isElastic()
Bytes
Bytes.realCapacity()
.
Elastic Bytes objects can automatically grow to accommodate additional data, whereas non-elastic ones have a fixed capacity.
@NotNull public @NotNull Bytes<Void> write(@NotNull @NotNull BytesStore bytes, long offset, long length) throws BufferUnderflowException, BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
StreamingDataOutput
BytesStore
into the output stream,
starting from the given read offset. It ensures that the output stream has enough capacity
to accommodate the incoming bytes. The position of this output stream is updated accordingly,
but the read position of the input data is not changed.bytes
- the BytesStore
from which data is read.offset
- the offset at which reading from the BytesStore
starts.length
- the number of bytes to write.BufferUnderflowException
- If there is not enough data available in the input.BufferOverflowException
- If there is not enough space left in the output stream.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 waypublic byte readVolatileByte(long offset) throws BufferUnderflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
RandomDataInput
readVolatileByte
in interface RandomDataInput
readVolatileByte
in class AbstractBytes<Void>
offset
- the location from where the byte value is read.BufferUnderflowException
- If the offset is beyond the limits of the byte source.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 waypublic short readVolatileShort(long offset) throws BufferUnderflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
RandomDataInput
readVolatileShort
in interface RandomDataInput
readVolatileShort
in class AbstractBytes<Void>
offset
- the location from where the short value is read.BufferUnderflowException
- If the offset is beyond the limits of the byte source.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 waypublic int readVolatileInt(long offset) throws BufferUnderflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
RandomDataInput
readVolatileInt
in interface RandomDataInput
readVolatileInt
in class AbstractBytes<Void>
offset
- the location from where the int value is read.BufferUnderflowException
- If the offset is beyond the limits of the byte source.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 waypublic long readVolatileLong(long offset) throws BufferUnderflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
RandomDataInput
readVolatileLong
in interface RandomDataInput
readVolatileLong
in class AbstractBytes<Void>
offset
- the location from where the long value is read.BufferUnderflowException
- If the offset is beyond the limits of the byte source.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 waypublic int peekUnsignedByte() throws net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
StreamingDataInput
peekUnsignedByte
in interface StreamingDataInput<Bytes<Void>>
peekUnsignedByte
in class AbstractBytes<Void>
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 waypublic int peekUnsignedByte(long offset) throws BufferUnderflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
RandomDataInput
peekUnsignedByte
in interface RandomDataInput
peekUnsignedByte
in class AbstractBytes<Void>
offset
- the location from where the unsigned byte value is read.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 wayBufferUnderflowException
public int peekVolatileInt() throws net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
RandomDataInput
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 way@NotNull public @NotNull Bytes<Void> appendUtf8(char[] chars, int offset, int length) throws BufferOverflowException, IllegalArgumentException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
StreamingDataOutput
chars
- The CharSequence to be appended.offset
- The offset from which to start writing the CharSequence.length
- The number of characters from the CharSequence to write.BufferOverflowException
- If there is not enough space left in the output stream.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 wayIllegalArgumentException
public boolean compareAndSwapLong(long offset, long expected, long value) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
RandomDataInput
compareAndSwapLong
in interface BytesStore<Bytes<Void>,Void>
compareAndSwapLong
in interface RandomDataInput
compareAndSwapLong
in interface RandomDataOutput<Bytes<Void>>
compareAndSwapLong
in class AbstractBytes<Void>
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
- If the capacity of this RandomDataOutput was exceeded.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 wayCopyright © 2023. All rights reserved.