public interface Byteable
BytesStore. Implementations
may be remapped to different offsets to avoid copying.| Modifier and Type | Method and Description |
|---|---|
default long |
address() |
@Nullable BytesStore<?,?> |
bytesStore() |
void |
bytesStore(@NotNull BytesStore bytesStore,
long offset,
long length)
Map this object onto a region of
bytesStore. |
default FileLock |
lock(boolean shared)
Locks the underlying file.
|
long |
maxSize() |
long |
offset() |
default FileLock |
tryLock(boolean shared)
Attempts to lock the underlying file without blocking.
|
void bytesStore(@NotNull
@NotNull BytesStore bytesStore,
long offset,
long length)
throws net.openhft.chronicle.core.io.ClosedIllegalStateException,
IllegalArgumentException,
BufferOverflowException,
BufferUnderflowException,
net.openhft.chronicle.core.io.ThreadingIllegalStateException
bytesStore.bytesStore - backing storeoffset - non-negative offsetlength - non-negative length which should match maxSize()IllegalArgumentException - if parameters are out of rangeBufferOverflowException - if the region would extend past the end of the storeBufferUnderflowException - if the region would start before 0net.openhft.chronicle.core.io.ClosedIllegalStateException - if the store is closednet.openhft.chronicle.core.io.ThreadingIllegalStateException - if accessed from the wrong thread@Nullable @Nullable BytesStore<?,?> bytesStore()
BytesStore or null if unmappedlong offset()
BytesStoredefault long address()
throws UnsupportedOperationException
UnsupportedOperationException - if not backed by native memorylong 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 © 2026 Chronicle Software Ltd. All rights reserved.