public abstract class AbstractBytesStore<B extends BytesStore<B,Underlying>,Underlying> extends Object implements BytesStore<B,Underlying>
charToString| Constructor and Description |
|---|
AbstractBytesStore() |
| Modifier and Type | Method and Description |
|---|---|
long |
addressForRead(long offset)
Obtain the underlying addressForRead.
|
long |
addressForWrite(long offset)
Obtain the underlying addressForRead.
|
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
|
default long |
readLimit() |
long |
readPosition()
The read position must be start() <= readPosition() && readPosition() <= readLimit() && readPosition < safeLimit()
|
long |
readRemaining() |
boolean |
sharedMemory() |
long |
start() |
default long |
writeLimit() |
default long |
writePosition()
The read position must be readPosition() <= writePosition() && writePosition() <= writeLimit()
|
default long |
writeRemaining() |
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddAndGetByteNotAtomic, addAndGetDoubleNotAtomic, addAndGetFloatNotAtomic, addAndGetIntNotAtomic, addAndGetLongNotAtomic, addAndGetShortNotAtomic, addAndGetUnsignedByteNotAtomic, addAndGetUnsignedIntNotAtomic, addAndGetUnsignedShortNotAtomic, byteCheckSum, bytesForRead, bytesForWrite, bytesStore, capacity, charAt, cipher, cipher, contentEquals, copy, copyTo, copyTo, empty, endsWith, equalBytes, from, inside, isClear, isDirectMemory, isEmpty, isPresent, isPresent, length, longCheckSum, move, nativePointer, readWrite, realCapacity, safeLimit, startsWith, startsWith, subSequence, to8bitString, toDebugString, toDebugString, underlyingObject, wrap, wrap, wrap, writeMaxLong, zeroOutaddAndGetDouble, addAndGetFloat, addAndGetInt, addAndGetLong, 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, toTemporaryDirectByteBufferappend, 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, writeVolatileShortrefCount, release, release, releaseAll, reserve, tryReservechars, codePoints, toStringpublic int peekUnsignedByte(long offset)
throws BufferUnderflowException
RandomDataInputpeekUnsignedByte in interface RandomDataInputoffset - to readBufferUnderflowExceptionpublic long readPosition()
public long readRemaining()
public long start()
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 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 ByteOrder byteOrder()
public boolean compareAndSwapInt(long offset,
int expected,
int value)
throws BufferOverflowException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptionpublic boolean compareAndSwapLong(long offset,
long expected,
long value)
throws BufferOverflowException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptionpublic boolean compareAndSwapFloat(long offset,
float expected,
float value)
throws BufferOverflowException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptionpublic boolean compareAndSwapDouble(long offset,
double expected,
double value)
throws BufferOverflowException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptionpublic boolean sharedMemory()
Copyright © 2018. All rights reserved.