B
- the BytesStore typeU
- the underlying type that the BytesStore managespublic interface Byteable<B extends BytesStore<B,U>,U>
Modifier and Type | Method and Description |
---|---|
default long |
address()
Returns the absolute address in the memory to which this object currently points.
|
@Nullable BytesStore<B,U> |
bytesStore()
Returns the ByteStore to which this object currently points.
|
void |
bytesStore(@NotNull BytesStore<B,U> bytesStore,
long offset,
long length)
Sets the reference to a data type that points to the underlying ByteStore.
|
default FileLock |
lock(boolean shared)
Locks the underlying file.
|
long |
maxSize()
Returns the maximum size in bytes that this reference can point to.
|
long |
offset()
Returns the offset within the ByteStore to which this object currently points.
|
default FileLock |
tryLock(boolean shared)
Attempts to lock the underlying file without blocking.
|
void bytesStore(@NotNull @NotNull BytesStore<B,U> bytesStore, long offset, long length) throws net.openhft.chronicle.core.io.ClosedIllegalStateException, IllegalArgumentException, BufferOverflowException, BufferUnderflowException
bytesStore
- the fixed-point ByteStoreoffset
- the offset within the ByteStore, indicating the starting point of the memory sectionlength
- the length of the memory section within the ByteStorenet.openhft.chronicle.core.io.ClosedIllegalStateException
- if it is closedIllegalArgumentException
- if the provided arguments are invalidBufferOverflowException
- if the new memory section extends beyond the end of the ByteStoreBufferUnderflowException
- if the new memory section starts before the start of the ByteStore@Nullable @Nullable BytesStore<B,U> bytesStore()
long offset()
default long address() throws UnsupportedOperationException
UnsupportedOperationException
- if the address is not set or the underlying ByteStore isn't nativelong maxSize()
default FileLock lock(boolean shared) throws IOException
shared
- true if the lock is shared, false if it's exclusiveIOException
- if an error occurs while locking the fileUnsupportedOperationException
- if the underlying implementation does not support file lockingdefault FileLock tryLock(boolean shared) throws IOException
shared
- true if the lock is shared, false if it's exclusiveIOException
- if an error occurs while trying to lock the fileUnsupportedOperationException
- if the underlying implementation does not support file lockingCopyright © 2023. All rights reserved.