public class HeapBytesStore<Underlying> extends Object implements BytesStore<HeapBytesStore<Underlying>,Underlying>
charToString
Modifier and Type | Method and Description |
---|---|
long |
address(long offset)
Obtain the underlying address.
|
default ByteOrder |
byteOrder() |
long |
capacity() |
boolean |
compareAndSwapInt(long offset,
int expected,
int value) |
boolean |
compareAndSwapLong(long offset,
long expected,
long value) |
BytesStore<HeapBytesStore<Underlying>,Underlying> |
copy() |
boolean |
equals(Object obj) |
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) |
double |
readDouble(long offset) |
float |
readFloat(long offset) |
int |
readInt(long offset) |
default long |
readLimit() |
long |
readLong(long offset) |
default long |
readPosition() |
default long |
readRemaining() |
short |
readShort(long offset) |
long |
refCount() |
void |
release() |
void |
reserve() |
default long |
start() |
String |
toString() |
Underlying |
underlyingObject() |
HeapBytesStore<Underlying> |
write(long offsetInRDO,
byte[] bytes,
int offset,
int length) |
void |
write(long offsetInRDO,
ByteBuffer bytes,
int offset,
int length) |
HeapBytesStore<Underlying> |
write(long offsetInRDO,
RandomDataInput bytes,
long offset,
long length) |
HeapBytesStore<Underlying> |
writeByte(long offset,
byte b) |
HeapBytesStore<Underlying> |
writeDouble(long offset,
double d) |
HeapBytesStore<Underlying> |
writeFloat(long offset,
float f) |
HeapBytesStore |
writeInt(long offset,
int i32) |
default long |
writeLimit() |
HeapBytesStore<Underlying> |
writeLong(long offset,
long i64) |
HeapBytesStore<Underlying> |
writeOrderedInt(long offset,
int i32) |
HeapBytesStore<Underlying> |
writeOrderedLong(long offset,
long i) |
default long |
writePosition() |
default long |
writeRemaining() |
HeapBytesStore<Underlying> |
writeShort(long offset,
short i16) |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAndGetInt, addAndGetLong, byteCheckSum, bytesForRead, bytesForWrite, bytesStore, charAt, copyTo, equalBytes, getAndAddInt, inside, isClear, length, nativePointer, realCapacity, safeLimit, subSequence, toDebugString, wrap, zeroOut
bytesEqual, copyTo, createCharToString, parseLong, printable, readBoolean, readIncompleteLong, readUnsignedByte, readUnsignedInt, readUnsignedShort, readVolatileInt, readVolatileLong
append, write, write, writeBoolean, writeByte, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort
close, releaseAll, tryReserve
chars, codePoints
public String toString()
toString
in interface CharSequence
toString
in class Object
public BytesStore<HeapBytesStore<Underlying>,Underlying> copy()
copy
in interface BytesStore<HeapBytesStore<Underlying>,Underlying>
public void reserve()
reserve
in interface net.openhft.chronicle.core.ReferenceCounted
public void release()
release
in interface net.openhft.chronicle.core.ReferenceCounted
public long refCount()
refCount
in interface net.openhft.chronicle.core.ReferenceCounted
public long capacity()
capacity
in interface BytesStore<HeapBytesStore<Underlying>,Underlying>
public Underlying underlyingObject()
underlyingObject
in interface BytesStore<HeapBytesStore<Underlying>,Underlying>
public boolean compareAndSwapInt(long offset, int expected, int value)
compareAndSwapInt
in interface BytesStore<HeapBytesStore<Underlying>,Underlying>
public boolean compareAndSwapLong(long offset, long expected, long value)
compareAndSwapLong
in interface BytesStore<HeapBytesStore<Underlying>,Underlying>
public byte readByte(long offset)
readByte
in interface RandomDataInput
public short readShort(long offset)
readShort
in interface RandomDataInput
public int readInt(long offset)
readInt
in interface RandomDataInput
public long readLong(long offset)
readLong
in interface RandomDataInput
public float readFloat(long offset)
readFloat
in interface RandomDataInput
public double readDouble(long offset)
readDouble
in interface RandomDataInput
public HeapBytesStore<Underlying> writeByte(long offset, byte b)
writeByte
in interface RandomDataOutput<HeapBytesStore<Underlying>>
public HeapBytesStore<Underlying> writeShort(long offset, short i16)
writeShort
in interface RandomDataOutput<HeapBytesStore<Underlying>>
public HeapBytesStore writeInt(long offset, int i32)
writeInt
in interface RandomDataOutput<HeapBytesStore<Underlying>>
public HeapBytesStore<Underlying> writeOrderedInt(long offset, int i32)
writeOrderedInt
in interface RandomDataOutput<HeapBytesStore<Underlying>>
public HeapBytesStore<Underlying> writeLong(long offset, long i64)
writeLong
in interface RandomDataOutput<HeapBytesStore<Underlying>>
public HeapBytesStore<Underlying> writeOrderedLong(long offset, long i)
writeOrderedLong
in interface RandomDataOutput<HeapBytesStore<Underlying>>
public HeapBytesStore<Underlying> writeFloat(long offset, float f)
writeFloat
in interface RandomDataOutput<HeapBytesStore<Underlying>>
public HeapBytesStore<Underlying> writeDouble(long offset, double d)
writeDouble
in interface RandomDataOutput<HeapBytesStore<Underlying>>
public HeapBytesStore<Underlying> write(long offsetInRDO, byte[] bytes, int offset, int length)
write
in interface RandomDataOutput<HeapBytesStore<Underlying>>
public void write(long offsetInRDO, ByteBuffer bytes, int offset, int length)
write
in interface RandomDataOutput<HeapBytesStore<Underlying>>
public HeapBytesStore<Underlying> write(long offsetInRDO, RandomDataInput bytes, long offset, long length)
write
in interface RandomDataOutput<HeapBytesStore<Underlying>>
public 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 heappublic void nativeRead(long position, long address, long size)
RandomDataInput
nativeRead
in interface RandomDataInput
position
- within the ByteStore to copy.address
- in native memorysize
- in bytespublic void nativeWrite(long address, long position, long size)
RandomDataOutput
nativeWrite
in interface RandomDataOutput<HeapBytesStore<Underlying>>
address
- in native memory to copy fromposition
- in BytesStore to copy tosize
- in bytespublic long start()
public long readPosition()
public long writePosition()
public long readRemaining()
public long writeRemaining()
public long readLimit()
public long writeLimit()
public ByteOrder byteOrder()
Copyright © 2015. All rights reserved.