public class SingleMappedBytes extends CommonMappedBytes
NOTE These Bytes are single Threaded as are all Bytes.
lastActualSize, mappedFile
TRACE
bytesStore, isPresent, readPosition, writeLimit, writePosition
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 |
---|---|
|
SingleMappedBytes(@NotNull MappedFile mappedFile) |
protected |
SingleMappedBytes(@NotNull MappedFile mappedFile,
String name) |
Modifier and Type | Method and Description |
---|---|
@NotNull Bytes<Void> |
clear()
Set the readPosition= writePosition = start, writeLimit = capacity
|
boolean |
compareAndSwapLong(long offset,
long expected,
long value)
Perform a 64-bit CAS at a given offset.
|
int |
peekVolatileInt() |
@NotNull Bytes<Void> |
readPositionRemaining(long position,
long remaining) |
Bytes<Void> |
write(@NotNull BytesStore bytes)
Writes all the passed BytesStore or it fails.
|
@NotNull SingleMappedBytes |
write(long offsetInRDO,
@NotNull byte[] bytes,
int offset,
int length)
Copy from byte[] into this.
|
@NotNull SingleMappedBytes |
write(long writeOffset,
@NotNull RandomDataInput bytes,
long readOffset,
long length)
Copy from RandomDataInput into this.
|
@NotNull Bytes<Void> |
writeSkip(long bytesToSkip)
Skip a number of bytes by moving the writePosition.
|
append8bit, appendUtf8, bytesStore, capacity, chunkCount, clearUsedByThread, close, copy, disableThreadSafetyCheck, isBackingFileReadOnly, isClosed, isDirectMemory, mappedFile, performRelease, read8bit, readLimitToCapacity, readStopBit, readStopBitChar, realCapacity, realReadRemaining, release, releaseLast, start, throwExceptionIfClosed, toString, warnAndCloseIfNotClosed, write, write, write, write, write8bit, writePosition, writeStopBit, writeStopBit, writeUtf8, writeUtf8
mappedBytes, mappedBytes, mappedBytes, mappedBytes, mappedBytes, readOnly, sharedMemory, singleMappedBytes, singleMappedBytes, singleMappedBytes
addressForRead, addressForWrite, addressForWritePosition, append, byteCheckSum, byteCheckSum, byteCheckSum, bytesStore, canReadDirect, canWriteDirect, clearAndPad, compact, compareAndSwapInt, equals, hashCode, isElastic, lastDecimalPlaces, lastDecimalPlaces, lastNumberHadDigits, lastNumberHadDigits, lenient, lenient, move, nativeRead, nativeWrite, peekUnsignedByte, peekUnsignedByte, prewrite, prewrite, prewriteByte, prewriteInt, prewriteLong, prewriteOffsetPositionMoved, prewriteShort, read, read, readByte, readByte, readCheckOffset, readDouble, readDouble, readFloat, readFloat, readInt, readInt, readLimit, readLimit, readLong, readLong, readOffsetPositionMoved, readPosition, readPosition, readShort, readShort, readSkip, readUnsignedByte, readUnsignedByte, readVolatileByte, readVolatileInt, readVolatileInt, readVolatileLong, readVolatileLong, readVolatileShort, safeCopySize, testAndSetInt, uncheckedReadSkipBackOne, uncheckedReadSkipOne, uncheckedReadUnsignedByte, uncheckedWritePosition, underlyingObject, write, write8bit, write8bit, write8bit, write8bit, writeByte, writeByte, writeCheckOffset, 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
assertReferencesReleased, backgroundPerformRelease, canReleaseInBackground, createdHere, disableReferenceTracing, enableReferenceTracing, refCount, referenceId, reserve, reservedBy, reserveTransfer, threadSafetyCheck, throwExceptionIfNotReleased, throwExceptionIfReleased, tryReserve, unmonitor, warnAndReleaseIfNotReleased
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
allocateDirect, allocateDirect, allocateElasticDirect, allocateElasticDirect, allocateElasticOnHeap, allocateElasticOnHeap, bytesForRead, copyTo, copyTo, directFrom, elasticByteBuffer, elasticByteBuffer, elasticByteBuffer, elasticHeapByteBuffer, elasticHeapByteBuffer, ensureCapacity, forFieldGroup, from, from, fromDirect, fromHexString, indexOf, indexOf, indexOf, isClear, isEqual, readBigDecimal, readBigInteger, readMarshallableLength16, readWithLength, readWrite, safeLimit, toHexString, toHexString, toHexString, toString, toString, toString, unchecked, unchecked, unwrite, valueOf, wrapForRead, wrapForRead, wrapForWrite, wrapForWrite, write, writeMarshallableLength16
addAndGetDoubleNotAtomic, addAndGetFloatNotAtomic, addAndGetIntNotAtomic, addAndGetShortNotAtomic, addAndGetUnsignedByteNotAtomic, bytesForWrite, charAt, cipher, cipher, contentEquals, elasticByteBuffer, empty, endsWith, equalBytes, forFields, from, hash, inside, inside, isEmpty, isEqual, lazyNativeBytesStoreWithFixedCapacity, length, nativePointer, nativeStore, nativeStoreFrom, nativeStoreWithFixedCapacity, startsWith, 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
addAndGetDouble, addAndGetFloat, addAndGetInt, addAndGetLong, compareUtf8, copyTo, 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, read8bit, readBoolean, readChar, readEnum, readHistogram, readIncompleteLong, readInt24, readPositionForHeader, readPositionUnlimited, readStopBitDecimal, readStopBitDouble, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8, readUtf8, readUtf8, readWithLength, readWithLength, readWithLength0, unsafeRead, unsafeReadObject, unsafeReadObject
bytesMethodWriter, writeObject
append, append, append, append, append, append, append, append, append, append8bit, append8bit, append8bit, append8bit, appendBase, appendBase16, appendBase16, appendDateMillis, appendDecimal, appendTimeMillis, writer
alignBy, appendUtf8, appendUtf8, appendUtf8, appendUtf8, appendUtf8, copyFrom, outputStream, rawWriteByte, rawWriteInt, rawWriteLong, unsafeWrite, unsafeWriteObject, unsafeWriteObject, write, write, write, write, write8bit, write8bit, writeBigDecimal, writeBigInteger, writeBoolean, writeChar, writeEnum, writeHistogram, writeInt24, writePositionForHeader, writePositionRemaining, writeSome, writeStopBit, writeStopBitDecimal, writeUnsignedByte, writeUnsignedInt, writeUnsignedInt24, writeUnsignedShort, writeWithLength
prepend
comment, indent, retainsComments
public SingleMappedBytes(@NotNull @NotNull MappedFile mappedFile) throws IllegalStateException
IllegalStateException
protected SingleMappedBytes(@NotNull @NotNull MappedFile mappedFile, String name) throws IllegalStateException
IllegalStateException
@NotNull public @NotNull SingleMappedBytes write(long offsetInRDO, @NotNull @NotNull byte[] bytes, int offset, int length) throws IllegalStateException, BufferOverflowException
RandomDataOutput
Does not update cursors e.g. writePosition()
write
in interface RandomDataOutput<Bytes<Void>>
write
in class AbstractBytes<Void>
offsetInRDO
- offset to write tobytes
- copy from bytesoffset
- copy from offsetIllegalStateException
BufferOverflowException
@NotNull public @NotNull SingleMappedBytes write(long writeOffset, @NotNull @NotNull RandomDataInput bytes, long readOffset, long length) throws BufferOverflowException, BufferUnderflowException, IllegalStateException
RandomDataOutput
writePosition()
nor RandomCommon.readPosition()
write
in interface RandomDataOutput<Bytes<Void>>
write
in class AbstractBytes<Void>
writeOffset
- offset to write tobytes
- copy from bytesreadOffset
- copy from offsetBufferOverflowException
IllegalStateException
BufferUnderflowException
@NotNull public @NotNull Bytes<Void> readPositionRemaining(long position, long remaining) throws BufferUnderflowException, IllegalStateException
@NotNull public @NotNull Bytes<Void> writeSkip(long bytesToSkip) throws BufferOverflowException, IllegalStateException
StreamingDataOutput
writeSkip
in interface StreamingDataOutput<Bytes<Void>>
writeSkip
in class CommonMappedBytes
bytesToSkip
- bytes to skip. This can be negative.BufferOverflowException
- if the offset is outside the limits of the BytesIllegalStateException
@NotNull public @NotNull Bytes<Void> clear() throws IllegalStateException
StreamingCommon
clear
in interface Bytes<Void>
clear
in interface StreamingCommon<Bytes<Void>>
clear
in class CommonMappedBytes
IllegalStateException
- if this resource has been previously releasedpublic int peekVolatileInt() throws IllegalStateException
IllegalStateException
public boolean compareAndSwapLong(long offset, long expected, long value) throws BufferOverflowException, IllegalStateException
compareAndSwapLong
in class AbstractBytes<Void>
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
IllegalStateException
public Bytes<Void> write(@NotNull @NotNull BytesStore bytes) throws BufferOverflowException, IllegalStateException
StreamingDataOutput
Calling this method will update the cursors of this, but not the bytes we read from.
bytes
- to writeBufferOverflowException
IllegalStateException
StreamingDataInput.read(Bytes)
Copyright © 2021. All rights reserved.