public abstract class AbstractBytesStore<B extends BytesStore<B,Underlying>,Underlying> extends net.openhft.chronicle.core.io.AbstractReferenceCounted implements BytesStore<B,Underlying>
charToString
Modifier | Constructor and Description |
---|---|
protected |
AbstractBytesStore() |
protected |
AbstractBytesStore(boolean monitored) |
Modifier and Type | Method and Description |
---|---|
long |
addressForRead(long offset)
Obtain the underlying addressForRead.
|
default long |
addressForRead(long offset,
int buffer) |
long |
addressForWrite(long offset)
Obtain the underlying addressForRead.
|
long |
addressForWritePosition() |
default ByteOrder |
byteOrder() |
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.
|
boolean |
compareAndSwapInt(long offset,
int expected,
int value)
Perform a 32-bit CAS at a given offset.
|
boolean |
compareAndSwapLong(long offset,
long expected,
long value)
Perform a 64-bit CAS at a given offset.
|
int |
hashCode() |
int |
peekUnsignedByte(long offset)
Read an unsigned byte at an offset, or -1
|
protected boolean |
performReleaseInBackground() |
default long |
readLimit() |
long |
readPosition()
The read position must be start() <= readPosition() && readPosition() <= readLimit() && readPosition < safeLimit()
|
long |
readRemaining() |
boolean |
sharedMemory() |
long |
start() |
void |
testAndSetInt(long offset,
int expected,
int value) |
default long |
writeLimit() |
default long |
writePosition()
The read position must be readPosition() <= writePosition() && writePosition() <= writeLimit()
|
default long |
writeRemaining() |
assertReferencesReleased, createdHere, disableReferenceTracing, enableReferenceTracing, performRelease, refCount, referenceId, release, releaseLast, reserve, reservedBy, reserveTransfer, threadSafetyCheck, throwExceptionIfNotReleased, throwExceptionIfReleased, toString, tryReserve, unmonitor, warnAndReleaseIfNotReleased
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addAndGetByteNotAtomic, addAndGetDoubleNotAtomic, addAndGetFloatNotAtomic, addAndGetIntNotAtomic, addAndGetLongNotAtomic, addAndGetShortNotAtomic, addAndGetUnsignedByteNotAtomic, addAndGetUnsignedIntNotAtomic, addAndGetUnsignedShortNotAtomic, byteCheckSum, byteCheckSum, bytesForRead, bytesForWrite, bytesStore, capacity, charAt, cipher, cipher, contentEquals, copy, copyTo, copyTo, empty, endsWith, equalBytes, from, inside, inside, isClear, isDirectMemory, isEmpty, isPresent, isPresent, length, longCheckSum, move, nativePointer, readWrite, realCapacity, safeLimit, startsWith, startsWith, subSequence, to8bitString, toDebugString, toDebugString, underlyingObject, wrap, wrap, wrap, writeMaxLong, zeroOut
addAndGetDouble, addAndGetFloat, addAndGetInt, addAndGetLong, canReadDirect, compareUtf8, copyTo, copyTo, createCharToString, fastHash, findByte, nativeRead, parseLong, peekVolatileInt, printable, read, readBoolean, readByte, readDouble, readFloat, readIncompleteLong, readInt, readLong, readShort, readUnsignedByte, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8Limited, readUtf8Limited, readVolatileByte, readVolatileDouble, readVolatileFloat, readVolatileInt, readVolatileLong, readVolatileShort, subBytes, toByteArray, toTemporaryDirectByteBuffer
append, append, nativeWrite, write, write, write, write, write, writeBoolean, writeByte, writeByte, writeDouble, writeFloat, writeInt, writeInt24, writeLong, writeOrderedDouble, writeOrderedFloat, writeOrderedInt, writeOrderedLong, writeShort, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort, writeUtf8, writeUtf8Limited, writeVolatileByte, writeVolatileDouble, writeVolatileFloat, writeVolatileInt, writeVolatileLong, writeVolatileShort
refCount, release, releaseLast, releaseLast, reserve, reservedBy, reserveTransfer, tryReserve
referenceId, referenceName, temporary
chars, codePoints, toString
protected AbstractBytesStore()
protected AbstractBytesStore(boolean monitored)
public int peekUnsignedByte(long offset) throws BufferUnderflowException
RandomDataInput
peekUnsignedByte
in interface RandomDataInput
offset
- to readBufferUnderflowException
public long readPosition()
public long readRemaining()
public long start()
protected boolean performReleaseInBackground()
performReleaseInBackground
in class net.openhft.chronicle.core.io.AbstractReferenceCounted
public long writePosition()
public long writeRemaining()
public long readLimit()
public long writeLimit()
public long addressForRead(long offset) throws UnsupportedOperationException, BufferUnderflowException
offset
- within this buffer. addressForRead(start()) is the actual addressForRead of the first byte.UnsupportedOperationException
- if the underlying buffer is on the heapBufferUnderflowException
- if the offset is before the start() or the after the capacity()public long addressForRead(long offset, int buffer) throws UnsupportedOperationException, BufferUnderflowException
public long addressForWrite(long offset) throws UnsupportedOperationException, BufferOverflowException
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()public long addressForWritePosition() throws UnsupportedOperationException, BufferOverflowException
public ByteOrder byteOrder()
public boolean compareAndSwapInt(long offset, int expected, int value) throws BufferOverflowException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
public void testAndSetInt(long offset, int expected, int value)
public boolean compareAndSwapLong(long offset, long expected, long value) throws BufferOverflowException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
public boolean compareAndSwapFloat(long offset, float expected, float value) throws BufferOverflowException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
public boolean compareAndSwapDouble(long offset, double expected, double value) throws BufferOverflowException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
public boolean sharedMemory()
Copyright © 2020. All rights reserved.