@Deprecated public enum ReleasedBytesStore extends Enum<ReleasedBytesStore> implements BytesStore
NoBytesStore
Enum Constant and Description |
---|
RELEASED_BYTES_STORE
Deprecated.
|
charToString
Modifier and Type | Method and Description |
---|---|
long |
addressForRead(long offset)
Deprecated.
Obtain the underlying addressForRead.
|
default long |
addressForRead(long offset,
int buffer) |
long |
addressForWrite(long offset)
Deprecated.
Obtain the underlying addressForRead.
|
long |
addressForWritePosition()
Deprecated.
|
default ByteOrder |
byteOrder() |
@NotNull Bytes |
bytesForWrite()
Deprecated.
Returns a Bytes that wraps this ByteStore from the
start to the realCapacity . |
long |
capacity()
Deprecated.
|
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)
Deprecated.
Perform a 32-bit CAS at a given offset.
|
boolean |
compareAndSwapLong(long offset,
long expected,
long value)
Deprecated.
Perform a 64-bit CAS at a given offset.
|
@NotNull BytesStore |
copy()
Deprecated.
|
long |
copyTo(@NotNull BytesStore store)
Deprecated.
Returns the number of bytes that were copied from this BytesStore to a destination BytesStore.
|
boolean |
equalBytes(@NotNull BytesStore bytesStore,
long length)
Deprecated.
Returns if a portion of a specified BytesStore matches this BytesStore.
|
boolean |
inside(long offset)
Deprecated.
Returns if a specified offset is inside this BytesStore limits.
|
boolean |
inside(long offset,
long buffer)
Deprecated.
Returns if a number of bytes starting from an offset are inside this ByteStore limits.
|
boolean |
isDirectMemory()
Deprecated.
|
void |
move(long from,
long to,
long length)
Deprecated.
|
void |
nativeRead(long position,
long address,
long size)
Deprecated.
expert level method for copying data to native memory.
|
void |
nativeWrite(long address,
long position,
long size)
Deprecated.
expert level method to copy data from native memory into the BytesStore
|
int |
peekUnsignedByte(long offset)
Deprecated.
Read an unsigned byte at an offset, or -1
|
byte |
readByte(long offset)
Deprecated.
Read byte at an offset
|
double |
readDouble(long offset)
Deprecated.
Read a double at an offset
|
float |
readFloat(long offset)
Deprecated.
Read a float at an offset
|
int |
readInt(long offset)
Deprecated.
Read an int at an offset
|
default long |
readLimit() |
long |
readLong(long offset)
Deprecated.
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)
Deprecated.
Read a short at an offset
|
byte |
readVolatileByte(long offset)
Deprecated.
Read a 8-bit byte from memory with a load barrier.
|
int |
readVolatileInt(long offset)
Deprecated.
Read a 32-bit int from memory with a load barrier.
|
long |
readVolatileLong(long offset)
Deprecated.
Read a 64-bit long from memory with a load barrier.
|
short |
readVolatileShort(long offset)
Deprecated.
Read a 16-bit short from memory with a load barrier.
|
default long |
realReadRemaining() |
default long |
realWriteRemaining() |
int |
refCount()
Deprecated.
|
void |
release(net.openhft.chronicle.core.io.ReferenceOwner id)
Deprecated.
|
static <T,B extends BytesStore<B,T>> |
releasedBytesStore()
Deprecated.
|
void |
releaseLast(net.openhft.chronicle.core.io.ReferenceOwner id)
Deprecated.
|
void |
reserve(net.openhft.chronicle.core.io.ReferenceOwner id)
Deprecated.
|
boolean |
reservedBy(net.openhft.chronicle.core.io.ReferenceOwner owner)
Deprecated.
|
boolean |
sharedMemory()
Deprecated.
|
default long |
start() |
void |
testAndSetInt(long offset,
int expected,
int value)
Deprecated.
|
boolean |
tryReserve(net.openhft.chronicle.core.io.ReferenceOwner id)
Deprecated.
|
Void |
underlyingObject()
Deprecated.
|
static ReleasedBytesStore |
valueOf(String name)
Deprecated.
Returns the enum constant of this type with the specified name.
|
static ReleasedBytesStore[] |
values()
Deprecated.
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@NotNull RandomDataOutput |
write(long offsetInRDO,
byte[] bytes,
int offset,
int length)
Deprecated.
|
void |
write(long offsetInRDO,
ByteBuffer bytes,
int offset,
int length)
Deprecated.
|
@NotNull RandomDataOutput |
write(long writeOffset,
RandomDataInput bytes,
long readOffset,
long length)
Deprecated.
|
long |
write8bit(long position,
BytesStore bs)
Deprecated.
Write the stop bit length and copy the BytesStore
|
long |
write8bit(long position,
String s,
int start,
int length)
Deprecated.
|
@NotNull RandomDataOutput |
writeByte(long offset,
byte i8)
Deprecated.
Write an unsigned byte at an offset.
|
@NotNull RandomDataOutput |
writeDouble(long offset,
double d)
Deprecated.
Write a double at an offset.
|
@NotNull RandomDataOutput |
writeFloat(long offset,
float d)
Deprecated.
Write a float at an offset.
|
@NotNull RandomDataOutput |
writeInt(long offset,
int i)
Deprecated.
Write an int at an offset.
|
default long |
writeLimit() |
@NotNull RandomDataOutput |
writeLong(long offset,
long i)
Deprecated.
Write a long at an offset.
|
@NotNull RandomDataOutput |
writeOrderedInt(long offset,
int i)
Deprecated.
Perform a non stalling write with a store barrier.
|
@NotNull RandomDataOutput |
writeOrderedLong(long offset,
long i)
Deprecated.
Perform a non stalling write with a store barrier.
|
default long |
writePosition()
The write position must be
readPosition() <= writePosition() && writePosition() <= writeLimit() |
default long |
writeRemaining() |
@NotNull RandomDataOutput |
writeShort(long offset,
short i)
Deprecated.
Write a short at an offset.
|
@NotNull RandomDataOutput |
writeVolatileByte(long offset,
byte i8)
Deprecated.
|
@NotNull RandomDataOutput |
writeVolatileInt(long offset,
int i32)
Deprecated.
|
@NotNull RandomDataOutput |
writeVolatileLong(long offset,
long i64)
Deprecated.
|
@NotNull RandomDataOutput |
writeVolatileShort(long offset,
short i16)
Deprecated.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
addAndGetDoubleNotAtomic, addAndGetFloatNotAtomic, addAndGetIntNotAtomic, addAndGetShortNotAtomic, addAndGetUnsignedByteNotAtomic, byteCheckSum, byteCheckSum, bytesForRead, bytesStore, charAt, cipher, cipher, contentEquals, copyTo, elasticByteBuffer, empty, endsWith, forFields, from, from, from, hash, isClear, isEmpty, isEqual, lazyNativeBytesStoreWithFixedCapacity, length, nativePointer, nativeStore, nativeStoreWithFixedCapacity, readWrite, realCapacity, safeLimit, startsWith, startsWith, subSequence, to8bitString, toDebugString, toDebugString, wrap, wrap, wrap, writeMaxInt, writeMaxLong, zeroOut
addAndGetDouble, addAndGetFloat, addAndGetInt, addAndGetLong, canReadDirect, compareUtf8, copyTo, copyTo, createCharToString, fastHash, findByte, parseLong, peekVolatileInt, printable, read, readBoolean, readIncompleteLong, readUnsignedByte, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8Limited, readUtf8Limited, readVolatileDouble, readVolatileFloat, subBytes, toByteArray, toTemporaryDirectByteBuffer
append, append, write, write, writeBoolean, writeByte, writeInt24, writeOrderedDouble, writeOrderedFloat, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort, writeUtf8, writeUtf8Limited, writeVolatileDouble, writeVolatileFloat
releaseLast, reserveTransfer
referenceId, referenceName, temporary
chars, codePoints, toString
public static final ReleasedBytesStore RELEASED_BYTES_STORE
public static ReleasedBytesStore[] values()
for (ReleasedBytesStore c : ReleasedBytesStore.values()) System.out.println(c);
public static ReleasedBytesStore 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>> @NotNull BytesStore<B,T> releasedBytesStore()
public void reserve(net.openhft.chronicle.core.io.ReferenceOwner id) throws IllegalStateException
reserve
in interface net.openhft.chronicle.core.io.ReferenceCounted
IllegalStateException
public void release(net.openhft.chronicle.core.io.ReferenceOwner id) throws IllegalStateException
release
in interface net.openhft.chronicle.core.io.ReferenceCounted
IllegalStateException
public int refCount()
refCount
in interface net.openhft.chronicle.core.io.ReferenceCounted
public boolean tryReserve(net.openhft.chronicle.core.io.ReferenceOwner id) throws IllegalStateException
tryReserve
in interface net.openhft.chronicle.core.io.ReferenceCounted
IllegalStateException
public boolean reservedBy(net.openhft.chronicle.core.io.ReferenceOwner owner)
reservedBy
in interface net.openhft.chronicle.core.io.ReferenceCounted
public void releaseLast(net.openhft.chronicle.core.io.ReferenceOwner id) throws IllegalStateException
releaseLast
in interface net.openhft.chronicle.core.io.ReferenceCounted
IllegalStateException
@NotNull public @NotNull RandomDataOutput writeByte(long offset, byte i8) throws IllegalStateException
RandomDataOutput
writeByte
in interface RandomDataOutput
offset
- to write toi8
- the valueIllegalStateException
@NotNull public @NotNull RandomDataOutput writeShort(long offset, short i) throws IllegalStateException
RandomDataOutput
writeShort
in interface RandomDataOutput
offset
- to write toi
- the valueIllegalStateException
@NotNull public @NotNull RandomDataOutput writeInt(long offset, int i) throws IllegalStateException
RandomDataOutput
writeInt
in interface RandomDataOutput
offset
- to write toi
- the valueIllegalStateException
@NotNull public @NotNull RandomDataOutput writeOrderedInt(long offset, int i) throws IllegalStateException
RandomDataOutput
writeOrderedInt
in interface RandomDataOutput
offset
- to write toi
- value to writeIllegalStateException
@NotNull public @NotNull RandomDataOutput writeLong(long offset, long i) throws IllegalStateException
RandomDataOutput
writeLong
in interface RandomDataOutput
offset
- to write toi
- the valueIllegalStateException
@NotNull public @NotNull RandomDataOutput writeOrderedLong(long offset, long i) throws IllegalStateException
RandomDataOutput
writeOrderedLong
in interface RandomDataOutput
offset
- to write toi
- value to writeIllegalStateException
@NotNull public @NotNull RandomDataOutput writeFloat(long offset, float d) throws IllegalStateException
RandomDataOutput
writeFloat
in interface RandomDataOutput
offset
- to write tod
- the valueIllegalStateException
@NotNull public @NotNull RandomDataOutput writeDouble(long offset, double d) throws IllegalStateException
RandomDataOutput
writeDouble
in interface RandomDataOutput
offset
- to write tod
- the valueIllegalStateException
@NotNull public @NotNull RandomDataOutput writeVolatileByte(long offset, byte i8) throws IllegalStateException
writeVolatileByte
in interface RandomDataOutput
IllegalStateException
@NotNull public @NotNull RandomDataOutput writeVolatileShort(long offset, short i16) throws IllegalStateException
writeVolatileShort
in interface RandomDataOutput
IllegalStateException
@NotNull public @NotNull RandomDataOutput writeVolatileInt(long offset, int i32) throws IllegalStateException
writeVolatileInt
in interface RandomDataOutput
IllegalStateException
@NotNull public @NotNull RandomDataOutput writeVolatileLong(long offset, long i64) throws IllegalStateException
writeVolatileLong
in interface RandomDataOutput
IllegalStateException
@NotNull public @NotNull RandomDataOutput write(long offsetInRDO, byte[] bytes, int offset, int length) throws IllegalStateException
write
in interface RandomDataOutput
IllegalStateException
public void write(long offsetInRDO, ByteBuffer bytes, int offset, int length) throws IllegalStateException
write
in interface RandomDataOutput
IllegalStateException
@NotNull public @NotNull RandomDataOutput write(long writeOffset, RandomDataInput bytes, long readOffset, long length) throws IllegalStateException
write
in interface RandomDataOutput
IllegalStateException
public long write8bit(long position, BytesStore bs)
RandomDataOutput
write8bit
in interface RandomDataOutput
position
- to writebs
- to copy.RandomDataOutput
public long write8bit(long position, String s, int start, int length)
write8bit
in interface RandomDataOutput
public byte readByte(long offset) throws IllegalStateException
RandomDataInput
readByte
in interface RandomDataInput
offset
- to readIllegalStateException
- if releasedpublic int peekUnsignedByte(long offset)
RandomDataInput
peekUnsignedByte
in interface RandomDataInput
offset
- to readpublic short readShort(long offset) throws IllegalStateException
RandomDataInput
readShort
in interface RandomDataInput
offset
- to readIllegalStateException
- if releasedpublic int readInt(long offset) throws IllegalStateException
RandomDataInput
readInt
in interface RandomDataInput
offset
- to readIllegalStateException
- if releasedpublic long readLong(long offset) throws IllegalStateException
RandomDataInput
readLong
in interface RandomDataInput
offset
- to readIllegalStateException
- if releasedpublic float readFloat(long offset) throws IllegalStateException
RandomDataInput
readFloat
in interface RandomDataInput
offset
- to readIllegalStateException
- if releasedpublic double readDouble(long offset) throws IllegalStateException
RandomDataInput
readDouble
in interface RandomDataInput
offset
- to readIllegalStateException
- if releasedpublic byte readVolatileByte(long offset) throws BufferUnderflowException, IllegalStateException
RandomDataInput
readVolatileByte
in interface RandomDataInput
offset
- to readBufferUnderflowException
- if the offset is outside the limits of the BytesIllegalStateException
- if releasedpublic short readVolatileShort(long offset) throws BufferUnderflowException, IllegalStateException
RandomDataInput
readVolatileShort
in interface RandomDataInput
offset
- to readBufferUnderflowException
- if the offset is outside the limits of the BytesIllegalStateException
- if releasedpublic int readVolatileInt(long offset) throws BufferUnderflowException, IllegalStateException
RandomDataInput
readVolatileInt
in interface RandomDataInput
offset
- to readBufferUnderflowException
- if the offset is outside the limits of the BytesIllegalStateException
- if releasedpublic long readVolatileLong(long offset) throws BufferUnderflowException, IllegalStateException
RandomDataInput
readVolatileLong
in interface RandomDataInput
offset
- to readBufferUnderflowException
- if the offset is outside the limits of the BytesIllegalStateException
- if releasedpublic boolean isDirectMemory()
isDirectMemory
in interface BytesStore
@NotNull public @NotNull BytesStore copy()
copy
in interface BytesStore
public long capacity()
capacity
in interface BytesStore
public Void underlyingObject()
underlyingObject
in interface BytesStore
public boolean inside(long offset)
BytesStore
Use this test to determine if an offset is considered safe.
inside
in interface BytesStore
offset
- the specified offset to checktrue
if offset is safepublic boolean inside(long offset, long buffer)
BytesStore
inside
in interface BytesStore
offset
- the starting index to checkbuffer
- the number of bytes after the offset to checktrue
if the bytes between the offset and offset+buffer are inside the BytesStorepublic long copyTo(@NotNull @NotNull BytesStore store) throws IllegalStateException
BytesStore
Copies the data to another BytesStore as long as space is available in the destination BytesStore.
copyTo
in interface BytesStore
store
- the BytesStore to copy toIllegalStateException
- if this BytesStore has been releasedpublic void nativeWrite(long address, long position, long size) throws IllegalStateException
RandomDataOutput
nativeWrite
in interface RandomDataOutput
address
- in native memory to copy fromposition
- in BytesStore to copy tosize
- in bytesIllegalStateException
public void nativeRead(long position, long address, long size) throws IllegalStateException
RandomDataInput
nativeRead
in interface RandomDataInput
position
- within the ByteStore to copy.address
- in native memorysize
- in bytesIllegalStateException
- if releasedpublic boolean compareAndSwapInt(long offset, int expected, int value) throws IllegalStateException
offset
- to perform CASexpected
- valuevalue
- to setIllegalStateException
public void testAndSetInt(long offset, int expected, int value) throws IllegalStateException
IllegalStateException
public boolean compareAndSwapLong(long offset, long expected, long value) throws IllegalStateException
offset
- to perform CASexpected
- valuevalue
- to setIllegalStateException
public boolean equalBytes(@NotNull @NotNull BytesStore bytesStore, long length) throws IllegalStateException
BytesStore
equalBytes
in interface BytesStore
bytesStore
- the BytesStore to match againstlength
- the length to matchtrue
if the bytes up to min(length, this.length(), bytesStore.length()) matched.IllegalStateException
public void move(long from, long to, long length) throws IllegalStateException
move
in interface BytesStore
IllegalStateException
public long addressForRead(long offset) throws BufferUnderflowException, IllegalStateException
offset
- within this buffer. addressForRead(start()) is the actual addressForRead of the first byte.BufferUnderflowException
- if the offset is before the start() or the after the capacity()IllegalStateException
public long addressForWrite(long offset) throws BufferOverflowException, IllegalStateException
offset
- within this buffer. addressForRead(start()) is the actual addressForRead of the first byte.BufferOverflowException
- if the offset is before the start() or the after the capacity()IllegalStateException
public long addressForWritePosition() throws UnsupportedOperationException, BufferOverflowException, IllegalStateException
@NotNull public @NotNull Bytes bytesForWrite() throws IllegalStateException
BytesStore
start
to the realCapacity
.
The returned Bytes is not elastic and can be both read and written using cursors.
bytesForWrite
in interface BytesStore
IllegalStateException
- if this BytesStore has been releasedpublic boolean sharedMemory()
public long start()
public long readPosition()
start() <= readPosition() && readPosition() <= readLimit() && readPosition < safeLimit()
public long writePosition()
readPosition() <= writePosition() && writePosition() <= writeLimit()
public long readRemaining()
public long realReadRemaining()
public long writeRemaining()
public long realWriteRemaining()
public long readLimit()
public long writeLimit()
public long addressForRead(long offset, int buffer) throws UnsupportedOperationException, BufferUnderflowException, IllegalStateException
public ByteOrder byteOrder()
public boolean compareAndSwapFloat(long offset, float expected, float value) throws BufferOverflowException, IllegalStateException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
IllegalStateException
public boolean compareAndSwapDouble(long offset, double expected, double value) throws BufferOverflowException, IllegalStateException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
IllegalStateException
Copyright © 2021. All rights reserved.