public class ExpectedBytesStore<B extends BytesStore<B,Underlying>,Underlying> extends Object implements BytesStore<B,Underlying>
charToString| Modifier and Type | Method and Description |
|---|---|
long |
address(long offset)
Obtain the underlying address.
|
default ByteOrder |
byteOrder() |
long |
capacity() |
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.
|
BytesStore<B,Underlying> |
copy() |
boolean |
isDirectMemory() |
void |
move(long from,
long to,
long length) |
void |
nativeRead(long position,
long address,
long size)
expert level method for copying data to native memory.
|
void |
nativeWrite(long address,
long position,
long size)
expert level method to copy data from native memory into the BytesStore
|
int |
peekUnsignedByte(long offset)
Read an unsigned byte at an offset, or -1
|
byte |
readByte(long offset)
Read byte at an offset
|
double |
readDouble(long offset)
Read a double at an offset
|
float |
readFloat(long offset)
Read a float at an offset
|
int |
readInt(long offset)
Read an int at an offset
|
default long |
readLimit() |
long |
readLong(long offset)
Read a long at an offset
|
default long |
readPosition()
The read position must be start() <= readPosition() && readPosition() <= readLimit() && readPosition < safeLimit()
|
default long |
readRemaining() |
short |
readShort(long offset)
Read a short at an offset
|
int |
readVolatileInt(long offset)
Read a 32-bit int from memory with a load barrier.
|
long |
refCount() |
void |
release() |
void |
reserve() |
boolean |
sharedMemory() |
default long |
start() |
Underlying |
underlyingObject() |
B |
write(long offsetInRDO,
byte[] bytes,
int offset,
int length) |
void |
write(long offsetInRDO,
ByteBuffer bytes,
int offset,
int length) |
B |
write(long offsetInRDO,
RandomDataInput bytes,
long offset,
long length) |
B |
writeByte(long offset,
byte i8)
Write an unsigned byte at an offset.
|
B |
writeDouble(long offset,
double d)
Write a double at an offset.
|
B |
writeFloat(long offset,
float d)
Write a float at an offset.
|
B |
writeInt(long offset,
int i)
Write an int at an offset.
|
default long |
writeLimit() |
B |
writeLong(long offset,
long i)
Write a long at an offset.
|
B |
writeOrderedInt(long offset,
int i)
Perform a non stalling write with a store barrier.
|
B |
writeOrderedLong(long offset,
long i)
Perform a non stalling write with a store barrier.
|
default long |
writePosition()
The read position must be readPosition() <= writePosition() && writePosition() <= writeLimit()
|
default long |
writeRemaining() |
B |
writeShort(long offset,
short i)
Write a short at an offset.
|
B |
writeVolatileByte(long offset,
byte i8) |
B |
writeVolatileInt(long offset,
int i32) |
B |
writeVolatileLong(long offset,
long i64) |
B |
writeVolatileShort(long offset,
short i16) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddAndGetByteNotAtomic, addAndGetDoubleNotAtomic, addAndGetFloatNotAtomic, addAndGetIntNotAtomic, addAndGetLongNotAtomic, addAndGetShortNotAtomic, addAndGetUnsignedByteNotAtomic, addAndGetUnsignedIntNotAtomic, addAndGetUnsignedShortNotAtomic, byteCheckSum, bytesForRead, bytesForWrite, bytesStore, charAt, contentEquals, copyTo, copyTo, empty, endsWith, equalBytes, from, inside, isClear, isEmpty, isPresent, isPresent, length, longCheckSum, nativePointer, realCapacity, safeLimit, startsWith, startsWith, subSequence, to8bitString, toDebugString, toDebugString, wrap, wrap, wrap, wrap, writeMaxLong, zeroOutaddAndGetDouble, addAndGetFloat, addAndGetInt, addAndGetLong, compareUtf8, copyTo, copyTo, createCharToString, fastHash, findByte, parseLong, peekVolatileInt, printable, read, readBoolean, readIncompleteLong, readUnsignedByte, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8Limited, readUtf8Limited, readVolatileByte, readVolatileDouble, readVolatileFloat, readVolatileLong, readVolatileShort, subBytes, toByteArray, toTemporaryDirectByteBufferappend, append, write, write, writeBoolean, writeByte, writeInt24, writeOrderedDouble, writeOrderedFloat, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort, writeUtf8, writeUtf8Limited, writeVolatileDouble, writeVolatileFloatclose, release, releaseAll, tryReservecloseQuietly, isClosed, notifyClosingchars, codePoints, toStringpublic boolean isDirectMemory()
isDirectMemory in interface BytesStore<B extends BytesStore<B,Underlying>,Underlying>public int peekUnsignedByte(long offset)
RandomDataInputpeekUnsignedByte in interface RandomDataInputoffset - to read@NotNull public BytesStore<B,Underlying> copy()
copy in interface BytesStore<B extends BytesStore<B,Underlying>,Underlying>public long capacity()
capacity in interface BytesStore<B extends BytesStore<B,Underlying>,Underlying>@Nullable public Underlying underlyingObject()
underlyingObject in interface BytesStore<B extends BytesStore<B,Underlying>,Underlying>public void nativeWrite(long address,
long position,
long size)
RandomDataOutputnativeWrite in interface RandomDataOutput<B extends BytesStore<B,Underlying>>address - in native memory to copy fromposition - in BytesStore to copy tosize - in bytespublic void nativeRead(long position,
long address,
long size)
RandomDataInputnativeRead in interface RandomDataInputposition - within the ByteStore to copy.address - in native memorysize - in bytespublic boolean compareAndSwapInt(long offset,
int expected,
int value)
offset - to perform CASexpected - valuevalue - to setpublic boolean compareAndSwapLong(long offset,
long expected,
long value)
offset - to perform CASexpected - valuevalue - to setpublic byte readByte(long offset)
RandomDataInputreadByte in interface RandomDataInputoffset - to readpublic short readShort(long offset)
RandomDataInputreadShort in interface RandomDataInputoffset - to readpublic int readInt(long offset)
RandomDataInputreadInt in interface RandomDataInputoffset - to readpublic int readVolatileInt(long offset)
RandomDataInputreadVolatileInt in interface RandomDataInputoffset - to readpublic long readLong(long offset)
RandomDataInputreadLong in interface RandomDataInputoffset - to readpublic float readFloat(long offset)
RandomDataInputreadFloat in interface RandomDataInputoffset - to readpublic double readDouble(long offset)
RandomDataInputreadDouble in interface RandomDataInputoffset - to read@NotNull public B writeByte(long offset, byte i8) throws AssertionError
RandomDataOutputwriteByte in interface RandomDataOutput<B extends BytesStore<B,Underlying>>offset - to write toi8 - the valueAssertionErrorpublic long address(long offset)
throws UnsupportedOperationException
offset - within this buffer. address(start()) is the actual address of the first byte.UnsupportedOperationException - if the underlying buffer is on the heap@NotNull public B writeShort(long offset, short i) throws AssertionError
RandomDataOutputwriteShort in interface RandomDataOutput<B extends BytesStore<B,Underlying>>offset - to write toi - the valueAssertionError@NotNull public B writeInt(long offset, int i) throws AssertionError
RandomDataOutputwriteInt in interface RandomDataOutput<B extends BytesStore<B,Underlying>>offset - to write toi - the valueAssertionErrorpublic void reserve()
throws IllegalStateException
reserve in interface net.openhft.chronicle.core.ReferenceCountedIllegalStateException@NotNull public B writeOrderedInt(long offset, int i) throws AssertionError
RandomDataOutputwriteOrderedInt in interface RandomDataOutput<B extends BytesStore<B,Underlying>>offset - to write toi - value to writeAssertionErrorpublic void release()
throws IllegalStateException
release in interface net.openhft.chronicle.core.ReferenceCountedIllegalStateException@NotNull public B writeLong(long offset, long i) throws AssertionError
RandomDataOutputwriteLong in interface RandomDataOutput<B extends BytesStore<B,Underlying>>offset - to write toi - the valueAssertionErrorpublic long refCount()
refCount in interface net.openhft.chronicle.core.ReferenceCounted@NotNull public B writeOrderedLong(long offset, long i) throws AssertionError
RandomDataOutputwriteOrderedLong in interface RandomDataOutput<B extends BytesStore<B,Underlying>>offset - to write toi - value to writeAssertionError@NotNull public B writeFloat(long offset, float d) throws AssertionError
RandomDataOutputwriteFloat in interface RandomDataOutput<B extends BytesStore<B,Underlying>>offset - to write tod - the valueAssertionError@NotNull public B writeDouble(long offset, double d) throws AssertionError
RandomDataOutputwriteDouble in interface RandomDataOutput<B extends BytesStore<B,Underlying>>offset - to write tod - the valueAssertionErrorpublic B writeVolatileByte(long offset, byte i8) throws BufferOverflowException
writeVolatileByte in interface RandomDataOutput<B extends BytesStore<B,Underlying>>BufferOverflowExceptionpublic B writeVolatileShort(long offset, short i16) throws BufferOverflowException
writeVolatileShort in interface RandomDataOutput<B extends BytesStore<B,Underlying>>BufferOverflowExceptionpublic B writeVolatileInt(long offset, int i32) throws BufferOverflowException
writeVolatileInt in interface RandomDataOutput<B extends BytesStore<B,Underlying>>BufferOverflowExceptionpublic B writeVolatileLong(long offset, long i64) throws BufferOverflowException
writeVolatileLong in interface RandomDataOutput<B extends BytesStore<B,Underlying>>BufferOverflowException@NotNull public B write(long offsetInRDO, byte[] bytes, int offset, int length) throws AssertionError, BufferOverflowException
write in interface RandomDataOutput<B extends BytesStore<B,Underlying>>AssertionErrorBufferOverflowExceptionpublic void write(long offsetInRDO,
ByteBuffer bytes,
int offset,
int length)
write in interface RandomDataOutput<B extends BytesStore<B,Underlying>>@NotNull public B write(long offsetInRDO, RandomDataInput bytes, long offset, long length)
write in interface RandomDataOutput<B extends BytesStore<B,Underlying>>public void move(long from,
long to,
long length)
move in interface BytesStore<B extends BytesStore<B,Underlying>,Underlying>public boolean sharedMemory()
public long start()
public long readPosition()
public long writePosition()
public long readRemaining()
public long writeRemaining()
public long readLimit()
public long writeLimit()
public ByteOrder byteOrder()
public boolean compareAndSwapFloat(long offset,
float expected,
float value)
throws BufferOverflowException,
IllegalArgumentException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptionIllegalArgumentExceptionpublic boolean compareAndSwapDouble(long offset,
double expected,
double value)
throws BufferOverflowException,
IllegalArgumentException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptionIllegalArgumentExceptionCopyright © 2016. All rights reserved.