public enum NoBytesStore extends Enum<NoBytesStore> implements BytesStore
| Enum Constant and Description |
|---|
NO_BYTES_STORE |
| Modifier and Type | Field and Description |
|---|---|
static Bytes |
NO_BYTES |
static long |
NO_PAGE |
charToString| Modifier and Type | Method and Description |
|---|---|
long |
address(long offset)
Obtain the underlying address.
|
default ByteOrder |
byteOrder() |
Bytes |
bytesForWrite() |
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 |
copy() |
long |
copyTo(BytesStore store)
Copy the data to another BytesStore as long as there is space available in the destination store.
|
boolean |
equalBytes(BytesStore bytesStore,
long length)
Check if a portion of a BytesStore matches this one.
|
boolean |
inside(long offset)
Use this test to determine if an offset is considered safe.
|
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
|
static <T,B extends BytesStore<B,T>> |
noBytesStore() |
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
|
byte |
readVolatileByte(long offset)
Read a 8-bit byte from memory with a load barrier.
|
int |
readVolatileInt(long offset)
Read a 32-bit int from memory with a load barrier.
|
long |
readVolatileLong(long offset)
Read a 64-bit long from memory with a load barrier.
|
short |
readVolatileShort(long offset)
Read a 16-bit short from memory with a load barrier.
|
long |
refCount() |
void |
release() |
void |
reserve() |
boolean |
sharedMemory() |
default long |
start() |
Void |
underlyingObject() |
static NoBytesStore |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NoBytesStore[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
RandomDataOutput |
write(long offsetInRDO,
byte[] bytes,
int offset,
int length) |
void |
write(long offsetInRDO,
ByteBuffer bytes,
int offset,
int length) |
RandomDataOutput |
write(long offsetInRDO,
RandomDataInput bytes,
long offset,
long length) |
RandomDataOutput |
writeByte(long offset,
byte i8)
Write an unsigned byte at an offset.
|
RandomDataOutput |
writeDouble(long offset,
double d)
Write a double at an offset.
|
RandomDataOutput |
writeFloat(long offset,
float d)
Write a float at an offset.
|
RandomDataOutput |
writeInt(long offset,
int i)
Write an int at an offset.
|
default long |
writeLimit() |
RandomDataOutput |
writeLong(long offset,
long i)
Write a long at an offset.
|
RandomDataOutput |
writeOrderedInt(long offset,
int i)
Perform a non stalling write with a store barrier.
|
RandomDataOutput |
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() |
RandomDataOutput |
writeShort(long offset,
short i)
Write a short at an offset.
|
RandomDataOutput |
writeVolatileByte(long offset,
byte i8) |
RandomDataOutput |
writeVolatileInt(long offset,
int i32) |
RandomDataOutput |
writeVolatileLong(long offset,
long i64) |
RandomDataOutput |
writeVolatileShort(long offset,
short i16) |
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfaddAndGetByteNotAtomic, addAndGetDoubleNotAtomic, addAndGetFloatNotAtomic, addAndGetIntNotAtomic, addAndGetLongNotAtomic, addAndGetShortNotAtomic, addAndGetUnsignedByteNotAtomic, addAndGetUnsignedIntNotAtomic, addAndGetUnsignedShortNotAtomic, byteCheckSum, bytesForRead, bytesStore, charAt, cipher, cipher, contentEquals, copyTo, empty, endsWith, from, isClear, isEmpty, isPresent, isPresent, length, longCheckSum, nativePointer, readWrite, realCapacity, safeLimit, startsWith, startsWith, subSequence, to8bitString, toDebugString, toDebugString, 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, readVolatileDouble, readVolatileFloat, subBytes, toByteArray, toTemporaryDirectByteBufferappend, append, write, write, writeBoolean, writeByte, writeInt24, writeOrderedDouble, writeOrderedFloat, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort, writeUtf8, writeUtf8Limited, writeVolatileDouble, writeVolatileFloatrelease, releaseAll, tryReservechars, codePoints, toStringpublic static final NoBytesStore NO_BYTES_STORE
public static final long NO_PAGE
@NotNull public static final Bytes NO_BYTES
public static NoBytesStore[] values()
for (NoBytesStore c : NoBytesStore.values()) System.out.println(c);
public static NoBytesStore valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null@NotNull public static <T,B extends BytesStore<B,T>> BytesStore<B,T> noBytesStore()
public void reserve()
throws IllegalStateException
reserve in interface net.openhft.chronicle.core.ReferenceCountedIllegalStateExceptionpublic void release()
throws IllegalStateException
release in interface net.openhft.chronicle.core.ReferenceCountedIllegalStateExceptionpublic long refCount()
refCount in interface net.openhft.chronicle.core.ReferenceCounted@NotNull public RandomDataOutput writeByte(long offset, byte i8)
RandomDataOutputwriteByte in interface RandomDataOutputoffset - to write toi8 - the value@NotNull public RandomDataOutput writeShort(long offset, short i)
RandomDataOutputwriteShort in interface RandomDataOutputoffset - to write toi - the value@NotNull public RandomDataOutput writeInt(long offset, int i)
RandomDataOutputwriteInt in interface RandomDataOutputoffset - to write toi - the value@NotNull public RandomDataOutput writeOrderedInt(long offset, int i)
RandomDataOutputwriteOrderedInt in interface RandomDataOutputoffset - to write toi - value to write@NotNull public RandomDataOutput writeLong(long offset, long i)
RandomDataOutputwriteLong in interface RandomDataOutputoffset - to write toi - the value@NotNull public RandomDataOutput writeOrderedLong(long offset, long i)
RandomDataOutputwriteOrderedLong in interface RandomDataOutputoffset - to write toi - value to write@NotNull public RandomDataOutput writeFloat(long offset, float d)
RandomDataOutputwriteFloat in interface RandomDataOutputoffset - to write tod - the value@NotNull public RandomDataOutput writeDouble(long offset, double d)
RandomDataOutputwriteDouble in interface RandomDataOutputoffset - to write tod - the value@NotNull public RandomDataOutput writeVolatileByte(long offset, byte i8)
writeVolatileByte in interface RandomDataOutput@NotNull public RandomDataOutput writeVolatileShort(long offset, short i16)
writeVolatileShort in interface RandomDataOutput@NotNull public RandomDataOutput writeVolatileInt(long offset, int i32)
writeVolatileInt in interface RandomDataOutput@NotNull public RandomDataOutput writeVolatileLong(long offset, long i64)
writeVolatileLong in interface RandomDataOutput@NotNull public RandomDataOutput write(long offsetInRDO, byte[] bytes, int offset, int length)
write in interface RandomDataOutputpublic void write(long offsetInRDO,
ByteBuffer bytes,
int offset,
int length)
write in interface RandomDataOutput@NotNull public RandomDataOutput write(long offsetInRDO, RandomDataInput bytes, long offset, long length)
write in interface RandomDataOutputpublic byte readByte(long offset)
RandomDataInputreadByte in interface RandomDataInputoffset - to readpublic int peekUnsignedByte(long offset)
RandomDataInputpeekUnsignedByte 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 readpublic byte readVolatileByte(long offset)
throws BufferUnderflowException
RandomDataInputreadVolatileByte in interface RandomDataInputoffset - to readBufferUnderflowException - if the offset is outside the limits of the Bytespublic short readVolatileShort(long offset)
throws BufferUnderflowException
RandomDataInputreadVolatileShort in interface RandomDataInputoffset - to readBufferUnderflowException - if the offset is outside the limits of the Bytespublic int readVolatileInt(long offset)
throws BufferUnderflowException
RandomDataInputreadVolatileInt in interface RandomDataInputoffset - to readBufferUnderflowException - if the offset is outside the limits of the Bytespublic long readVolatileLong(long offset)
throws BufferUnderflowException
RandomDataInputreadVolatileLong in interface RandomDataInputoffset - to readBufferUnderflowException - if the offset is outside the limits of the Bytespublic boolean isDirectMemory()
isDirectMemory in interface BytesStore@NotNull public BytesStore copy()
copy in interface BytesStorepublic long capacity()
capacity in interface BytesStorepublic Void underlyingObject()
underlyingObject in interface BytesStorepublic boolean inside(long offset)
BytesStoreinside in interface BytesStorepublic long copyTo(BytesStore store)
BytesStorecopyTo in interface BytesStorestore - to copy topublic void nativeWrite(long address,
long position,
long size)
RandomDataOutputnativeWrite in interface RandomDataOutputaddress - 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 boolean equalBytes(BytesStore bytesStore, long length)
BytesStoreequalBytes in interface BytesStorebytesStore - to match againstlength - to match.public void move(long from,
long to,
long length)
move in interface BytesStorepublic long address(long offset)
throws BufferOverflowException
offset - within this buffer. address(start()) is the actual address of the first byte.BufferOverflowException@NotNull public Bytes bytesForWrite()
bytesForWrite in interface BytesStorepublic 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 © 2017. All rights reserved.