public class ReadOnlyMappedBytesStore extends MappedBytesStore
address, maximumLimit, memory, releasedHere
charToString
Constructor and Description |
---|
ReadOnlyMappedBytesStore(net.openhft.chronicle.core.ReferenceCounted owner,
long start,
long address,
long capacity,
long safeCapacity) |
Modifier and Type | Method and Description |
---|---|
long |
appendUTF(long pos,
char[] chars,
int offset,
int length) |
long |
appendUtf8(long pos,
char[] chars,
int offset,
int length) |
default ByteOrder |
byteOrder() |
VanillaBytes<Void> |
bytesForWrite() |
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.
|
void |
nativeWrite(long address,
long position,
long size)
expert level method to copy data from native memory into the BytesStore
|
default long |
readLimit() |
boolean |
readWrite() |
NativeBytesStore<Void> |
write(long offsetInRDO,
byte[] bytes,
int offset,
int length) |
void |
write(long offsetInRDO,
ByteBuffer bytes,
int offset,
int length) |
NativeBytesStore<Void> |
write(long offsetInRDO,
RandomDataInput bytes,
long offset,
long length) |
void |
write0(long offsetInRDO,
RandomDataInput bytes,
long offset,
long length) |
NativeBytesStore<Void> |
writeByte(long offset,
byte i8)
Write an unsigned byte at an offset.
|
NativeBytesStore<Void> |
writeDouble(long offset,
double d)
Write a double at an offset.
|
NativeBytesStore<Void> |
writeFloat(long offset,
float f)
Write a float at an offset.
|
NativeBytesStore<Void> |
writeInt(long offset,
int i32)
Write an int at an offset.
|
default long |
writeLimit() |
NativeBytesStore<Void> |
writeLong(long offset,
long i64)
Write a long at an offset.
|
NativeBytesStore<Void> |
writeOrderedInt(long offset,
int i)
Perform a non stalling write with a store barrier.
|
NativeBytesStore<Void> |
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() |
NativeBytesStore<Void> |
writeShort(long offset,
short i16)
Write a short at an offset.
|
NativeBytesStore<Void> |
writeVolatileByte(long offset,
byte i8) |
NativeBytesStore<Void> |
writeVolatileInt(long offset,
int i32) |
NativeBytesStore<Void> |
writeVolatileLong(long offset,
long i64) |
NativeBytesStore<Void> |
writeVolatileShort(long offset,
short i16) |
NativeBytesStore<Void> |
zeroOut(long start,
long end)
Fill the BytesStore with zeros
|
inside, readByte, safeLimit, start, translate
addressForRead, addressForWrite, byteCheckSum, byteCheckSum, capacity, checkReleased, copy, copyTo, copyToDirect, elasticByteBuffer, elasticByteBuffer, equals, fastHash, from, from, init, isDirectMemory, lazyNativeBytesStoreWithFixedCapacity, move, nativeRead, nativeStore, nativeStoreWithFixedCapacity, peekUnsignedByte, read, readDouble, readFloat, readIncompleteLong, readInt, readLong, readShort, readVolatileByte, readVolatileInt, readVolatileLong, readVolatileShort, realCapacity, refCount, release, reserve, setAddress, sharedMemory, toString, toTemporaryDirectByteBuffer, underlyingObject, uninit, uninitialized, wrap
hashCode, readPosition, readRemaining
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAndGetByteNotAtomic, addAndGetDoubleNotAtomic, addAndGetFloatNotAtomic, addAndGetIntNotAtomic, addAndGetLongNotAtomic, addAndGetShortNotAtomic, addAndGetUnsignedByteNotAtomic, addAndGetUnsignedIntNotAtomic, addAndGetUnsignedShortNotAtomic, bytesForRead, bytesStore, charAt, cipher, cipher, contentEquals, copyTo, empty, endsWith, equalBytes, from, isClear, isEmpty, isPresent, isPresent, length, longCheckSum, nativePointer, startsWith, startsWith, subSequence, to8bitString, toDebugString, toDebugString, wrap, wrap, writeMaxLong
addAndGetDouble, addAndGetFloat, addAndGetInt, addAndGetLong, compareUtf8, copyTo, copyTo, createCharToString, findByte, parseLong, peekVolatileInt, printable, readBoolean, readUnsignedByte, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8Limited, readUtf8Limited, readVolatileDouble, readVolatileFloat, subBytes, toByteArray
append, append, write, write, writeBoolean, writeByte, writeInt24, writeOrderedDouble, writeOrderedFloat, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort, writeUtf8, writeUtf8Limited, writeVolatileDouble, writeVolatileFloat
release, releaseAll, tryReserve
chars, codePoints
public ReadOnlyMappedBytesStore(net.openhft.chronicle.core.ReferenceCounted owner, long start, long address, long capacity, long safeCapacity) throws IllegalStateException
IllegalStateException
@NotNull public NativeBytesStore<Void> zeroOut(long start, long end)
BytesStore
zeroOut
in interface BytesStore<NativeBytesStore<Void>,Void>
zeroOut
in interface RandomDataOutput<NativeBytesStore<Void>>
zeroOut
in class NativeBytesStore<Void>
start
- first byte inclusiveend
- last byte exclusive.public boolean compareAndSwapInt(long offset, int expected, int value)
compareAndSwapInt
in class NativeBytesStore<Void>
offset
- to perform CASexpected
- valuevalue
- to setpublic boolean compareAndSwapLong(long offset, long expected, long value)
compareAndSwapLong
in class NativeBytesStore<Void>
offset
- to perform CASexpected
- valuevalue
- to set@NotNull public NativeBytesStore<Void> writeByte(long offset, byte i8)
RandomDataOutput
writeByte
in interface RandomDataOutput<NativeBytesStore<Void>>
writeByte
in class NativeBytesStore<Void>
offset
- to write toi8
- the value@NotNull public NativeBytesStore<Void> writeShort(long offset, short i16)
RandomDataOutput
writeShort
in interface RandomDataOutput<NativeBytesStore<Void>>
writeShort
in class NativeBytesStore<Void>
offset
- to write toi16
- the value@NotNull public NativeBytesStore<Void> writeInt(long offset, int i32)
RandomDataOutput
writeInt
in interface RandomDataOutput<NativeBytesStore<Void>>
writeInt
in class NativeBytesStore<Void>
offset
- to write toi32
- the value@NotNull public NativeBytesStore<Void> writeLong(long offset, long i64)
RandomDataOutput
writeLong
in interface RandomDataOutput<NativeBytesStore<Void>>
writeLong
in class NativeBytesStore<Void>
offset
- to write toi64
- the value@NotNull public NativeBytesStore<Void> writeOrderedLong(long offset, long i)
RandomDataOutput
writeOrderedLong
in interface RandomDataOutput<NativeBytesStore<Void>>
writeOrderedLong
in class NativeBytesStore<Void>
offset
- to write toi
- value to write@NotNull public NativeBytesStore<Void> writeFloat(long offset, float f)
RandomDataOutput
writeFloat
in interface RandomDataOutput<NativeBytesStore<Void>>
writeFloat
in class NativeBytesStore<Void>
offset
- to write tof
- the value@NotNull public NativeBytesStore<Void> writeDouble(long offset, double d)
RandomDataOutput
writeDouble
in interface RandomDataOutput<NativeBytesStore<Void>>
writeDouble
in class NativeBytesStore<Void>
offset
- to write tod
- the value@NotNull public NativeBytesStore<Void> writeVolatileByte(long offset, byte i8)
writeVolatileByte
in interface RandomDataOutput<NativeBytesStore<Void>>
writeVolatileByte
in class NativeBytesStore<Void>
@NotNull public NativeBytesStore<Void> writeVolatileShort(long offset, short i16)
writeVolatileShort
in interface RandomDataOutput<NativeBytesStore<Void>>
writeVolatileShort
in class NativeBytesStore<Void>
@NotNull public NativeBytesStore<Void> writeVolatileInt(long offset, int i32)
writeVolatileInt
in interface RandomDataOutput<NativeBytesStore<Void>>
writeVolatileInt
in class NativeBytesStore<Void>
@NotNull public NativeBytesStore<Void> writeVolatileLong(long offset, long i64)
writeVolatileLong
in interface RandomDataOutput<NativeBytesStore<Void>>
writeVolatileLong
in class NativeBytesStore<Void>
@NotNull public NativeBytesStore<Void> write(long offsetInRDO, byte[] bytes, int offset, int length)
write
in interface RandomDataOutput<NativeBytesStore<Void>>
write
in class NativeBytesStore<Void>
public void write(long offsetInRDO, @NotNull ByteBuffer bytes, int offset, int length)
write
in interface RandomDataOutput<NativeBytesStore<Void>>
write
in class NativeBytesStore<Void>
@NotNull public NativeBytesStore<Void> write(long offsetInRDO, @NotNull RandomDataInput bytes, long offset, long length) throws BufferOverflowException, BufferUnderflowException
write
in interface RandomDataOutput<NativeBytesStore<Void>>
write
in class NativeBytesStore<Void>
BufferOverflowException
BufferUnderflowException
public void write0(long offsetInRDO, @NotNull RandomDataInput bytes, long offset, long length)
write0
in class NativeBytesStore<Void>
public void nativeWrite(long address, long position, long size)
RandomDataOutput
nativeWrite
in interface RandomDataOutput<NativeBytesStore<Void>>
nativeWrite
in class NativeBytesStore<Void>
address
- in native memory to copy fromposition
- in BytesStore to copy tosize
- in bytespublic long appendUTF(long pos, char[] chars, int offset, int length)
appendUTF
in class NativeBytesStore<Void>
public long appendUtf8(long pos, char[] chars, int offset, int length)
appendUtf8
in class NativeBytesStore<Void>
@NotNull public VanillaBytes<Void> bytesForWrite() throws IllegalStateException
bytesForWrite
in interface BytesStore<NativeBytesStore<Void>,Void>
bytesForWrite
in class MappedBytesStore
IllegalStateException
@NotNull public NativeBytesStore<Void> writeOrderedInt(long offset, int i)
RandomDataOutput
writeOrderedInt
in interface RandomDataOutput<NativeBytesStore<Void>>
writeOrderedInt
in class MappedBytesStore
offset
- to write toi
- value to writepublic boolean readWrite()
public long writePosition()
public long writeRemaining()
public long readLimit()
public long writeLimit()
public ByteOrder byteOrder()
public boolean compareAndSwapFloat(long offset, float expected, float value) throws BufferOverflowException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
public boolean compareAndSwapDouble(long offset, double expected, double value) throws BufferOverflowException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
Copyright © 2017. All rights reserved.