public class PointerBytesStore extends NativeBytesStore<Void>
address, limit, maximumLimit, memory
referenceCounted, WARN_COUNT, WARN_NS
charToString
Constructor and Description |
---|
PointerBytesStore() |
Modifier and Type | Method and Description |
---|---|
default long |
addressForRead(long offset,
int buffer) |
default ByteOrder |
byteOrder() |
@NotNull VanillaBytes<Void> |
bytesForWrite()
Returns a Bytes that wraps this ByteStore from the
start to the realCapacity . |
default boolean |
compareAndSwapDouble(long offset,
double expected,
double value)
Perform a 64-bit double CAS at a given offset.
|
default boolean |
compareAndSwapFloat(long offset,
float expected,
float value)
Perform a 32-bit float CAS at a given offset.
|
default long |
readLimit() |
default long |
realReadRemaining() |
default long |
realWriteRemaining() |
long |
safeLimit() |
void |
set(long address,
long capacity) |
long |
start() |
default long |
writeLimit() |
default long |
writePosition()
The write position must be
readPosition() <= writePosition() && writePosition() <= writeLimit() |
addAndGetInt, addAndGetLong, addressForRead, addressForWrite, addressForWritePosition, appendUTF, appendUtf8, byteCheckSum, byteCheckSum, canReadDirect, capacity, compareAndSwapInt, compareAndSwapLong, copy, copyTo, copyToDirect, elasticByteBuffer, elasticByteBuffer, equals, fastHash, from, from, init, isDirectMemory, isEqual, lazyNativeBytesStoreWithFixedCapacity, move, nativeRead, nativeStore, nativeStoreWithFixedCapacity, nativeWrite, peekUnsignedByte, performRelease, read, readByte, readDouble, readFloat, readIncompleteLong, readInt, readLong, readShort, readUnsignedByte, readVolatileByte, readVolatileInt, readVolatileLong, readVolatileShort, realCapacity, setAddress, sharedMemory, testAndSetInt, toString, toTemporaryDirectByteBuffer, translate, underlyingObject, uninit, uninitialized, wrap, write, write, write, write0, write8bit, write8bit, writeByte, writeDouble, writeFloat, writeInt, writeLong, writeOrderedInt, writeOrderedLong, writeShort, writeVolatileByte, writeVolatileInt, writeVolatileLong, writeVolatileShort, zeroOut
hashCode, performReleaseInBackground, readPosition, readRemaining, writeRemaining
assertReferencesReleased, clearUsedByThread, createdHere, disableReferenceTracing, enableReferenceTracing, refCount, referenceId, release, releaseLast, reserve, reservedBy, reserveTransfer, threadSafetyCheck, throwExceptionIfNotReleased, throwExceptionIfReleased, tryReserve, unmonitor, warnAndReleaseIfNotReleased
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAndGetDoubleNotAtomic, addAndGetFloatNotAtomic, addAndGetIntNotAtomic, addAndGetShortNotAtomic, addAndGetUnsignedByteNotAtomic, bytesForRead, bytesStore, charAt, cipher, cipher, contentEquals, copyTo, empty, endsWith, equalBytes, forFields, from, from, hash, inside, inside, isClear, isEmpty, length, nativePointer, readWrite, startsWith, startsWith, subSequence, to8bitString, toDebugString, toDebugString, wrap, wrap, writeMaxInt, writeMaxLong
addAndGetDouble, addAndGetFloat, compareUtf8, copyTo, copyTo, createCharToString, findByte, parseLong, peekVolatileInt, printable, readBoolean, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8Limited, readUtf8Limited, readVolatileDouble, readVolatileFloat, subBytes, toByteArray
append, append, write, write, writeBoolean, writeByte, writeInt24, writeOrderedDouble, writeOrderedFloat, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort, writeUtf8, writeUtf8Limited, writeVolatileDouble, writeVolatileFloat
refCount, release, releaseLast, releaseLast, reserve, reservedBy, reserveTransfer, tryReserve
referenceId, referenceName, temporary
chars, codePoints
public void set(long address, long capacity)
@NotNull public @NotNull VanillaBytes<Void> bytesForWrite() throws IllegalStateException
BytesStore
start
to the realCapacity
.
The returned Bytes is not elastic and can be both read and written using cursors.
bytesForWrite
in interface BytesStore<NativeBytesStore<Void>,Void>
bytesForWrite
in class NativeBytesStore<Void>
IllegalStateException
- if this BytesStore has been releasedpublic long safeLimit()
safeLimit
in interface BytesStore<NativeBytesStore<Void>,Void>
safeLimit
in class NativeBytesStore<Void>
public long start()
start
in class AbstractBytesStore<NativeBytesStore<Void>,Void>
public long writePosition()
readPosition() <= writePosition() && writePosition() <= writeLimit()
public long realReadRemaining()
public long realWriteRemaining()
public long readLimit()
public long writeLimit()
public long addressForRead(long offset, int buffer) throws UnsupportedOperationException, BufferUnderflowException, IllegalStateException
public ByteOrder byteOrder()
public boolean compareAndSwapFloat(long offset, float expected, float value) throws BufferOverflowException, IllegalStateException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
IllegalStateException
public boolean compareAndSwapDouble(long offset, double expected, double value) throws BufferOverflowException, IllegalStateException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
IllegalStateException
Copyright © 2021. All rights reserved.