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() |
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
|
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
|
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, isNative, 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, printable, read, readBoolean, readIncompleteLong, readUnsignedByte, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8Limited, readUtf8Limited, readVolatileByte, readVolatileDouble, readVolatileFloat, readVolatileInt, readVolatileLong, readVolatileShort, subBytes, toByteArray, toTemporaryDirectByteBufferappend, write, write, writeBoolean, writeByte, writeInt24, writeOrderedDouble, writeOrderedFloat, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort, writeUtf8, writeUtf8Limited, writeVolatileDouble, writeVolatileFloatclose, release, releaseAll, tryReservecloseQuietly, isClosed, notifyClosingchars, codePoints, toString@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 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, net.openhft.chronicle.core.io.IORuntimeException
RandomDataOutputwriteShort in interface RandomDataOutput<B extends BytesStore<B,Underlying>>offset - to write toi - the valueIORuntimeException - if the underlying buffer fails to resize.AssertionErrornet.openhft.chronicle.core.io.IORuntimeException@NotNull public B writeInt(long offset, int i) throws AssertionError, net.openhft.chronicle.core.io.IORuntimeException
RandomDataOutputwriteInt in interface RandomDataOutput<B extends BytesStore<B,Underlying>>offset - to write toi - the valueIORuntimeException - if the underlying buffer fails to resize.AssertionErrornet.openhft.chronicle.core.io.IORuntimeExceptionpublic void reserve()
throws IllegalStateException
reserve in interface net.openhft.chronicle.core.ReferenceCountedIllegalStateException@NotNull public B writeOrderedInt(long offset, int i) throws AssertionError, net.openhft.chronicle.core.io.IORuntimeException
RandomDataOutputwriteOrderedInt in interface RandomDataOutput<B extends BytesStore<B,Underlying>>offset - to write toi - value to writeIORuntimeException - if the underlying buffer fails to resize.AssertionErrornet.openhft.chronicle.core.io.IORuntimeExceptionpublic void release()
throws IllegalStateException
release in interface net.openhft.chronicle.core.ReferenceCountedIllegalStateException@NotNull public B writeLong(long offset, long i) throws AssertionError, net.openhft.chronicle.core.io.IORuntimeException
RandomDataOutputwriteLong in interface RandomDataOutput<B extends BytesStore<B,Underlying>>offset - to write toi - the valueIORuntimeException - if the underlying buffer fails to resize.AssertionErrornet.openhft.chronicle.core.io.IORuntimeExceptionpublic long refCount()
refCount in interface net.openhft.chronicle.core.ReferenceCounted@NotNull public B writeOrderedLong(long offset, long i) throws AssertionError, net.openhft.chronicle.core.io.IORuntimeException
RandomDataOutputwriteOrderedLong in interface RandomDataOutput<B extends BytesStore<B,Underlying>>offset - to write toi - value to writeAssertionErrornet.openhft.chronicle.core.io.IORuntimeException@NotNull public B writeFloat(long offset, float d) throws AssertionError, net.openhft.chronicle.core.io.IORuntimeException
RandomDataOutputwriteFloat in interface RandomDataOutput<B extends BytesStore<B,Underlying>>offset - to write tod - the valueIORuntimeException - if the underlying buffer fails to resize.AssertionErrornet.openhft.chronicle.core.io.IORuntimeException@NotNull public B writeDouble(long offset, double d) throws AssertionError, net.openhft.chronicle.core.io.IORuntimeException
RandomDataOutputwriteDouble in interface RandomDataOutput<B extends BytesStore<B,Underlying>>offset - to write tod - the valueIORuntimeException - if the underlying buffer fails to resize.AssertionErrornet.openhft.chronicle.core.io.IORuntimeExceptionpublic B writeVolatileByte(long offset, byte i8) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
writeVolatileByte in interface RandomDataOutput<B extends BytesStore<B,Underlying>>BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeExceptionpublic B writeVolatileShort(long offset, short i16) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
writeVolatileShort in interface RandomDataOutput<B extends BytesStore<B,Underlying>>BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeExceptionpublic B writeVolatileInt(long offset, int i32) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
writeVolatileInt in interface RandomDataOutput<B extends BytesStore<B,Underlying>>BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeExceptionpublic B writeVolatileLong(long offset, long i64) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
writeVolatileLong in interface RandomDataOutput<B extends BytesStore<B,Underlying>>BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull public B write(long offsetInRDO, byte[] bytes, int offset, int length) throws AssertionError, BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
write in interface RandomDataOutput<B extends BytesStore<B,Underlying>>AssertionErrorBufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeExceptionpublic 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,
net.openhft.chronicle.core.io.IORuntimeException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptionIllegalArgumentExceptionnet.openhft.chronicle.core.io.IORuntimeExceptionpublic boolean compareAndSwapDouble(long offset,
double expected,
double value)
throws BufferOverflowException,
IllegalArgumentException,
net.openhft.chronicle.core.io.IORuntimeException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptionIllegalArgumentExceptionnet.openhft.chronicle.core.io.IORuntimeExceptionCopyright © 2016. All rights reserved.