public class ChunkedMappedFile extends MappedFile
newChunkListener
Constructor and Description |
---|
ChunkedMappedFile(@NotNull File file,
@NotNull RandomAccessFile raf,
long chunkSize,
long overlapSize,
long capacity,
boolean readOnly) |
Modifier and Type | Method and Description |
---|---|
@NotNull MappedBytesStore |
acquireByteStore(net.openhft.chronicle.core.io.ReferenceOwner owner,
long position,
BytesStore oldByteStore,
@NotNull MappedBytesStoreFactory mappedBytesStoreFactory) |
long |
actualSize() |
long |
capacity() |
long |
chunkCount() |
void |
chunkCount(long[] chunkCount) |
long |
chunkSize() |
MappedBytes |
createBytesFor() |
protected void |
finalize()
Deprecated.
as per https://github.com/OpenHFT/Chronicle-Bytes/issues/348
|
NewChunkListener |
getNewChunkListener() |
FileLock |
lock(long position,
long size,
boolean shared)
Calls lock on the underlying file channel
|
long |
overlapSize() |
protected void |
performRelease() |
@NotNull RandomAccessFile |
raf() |
@NotNull String |
referenceCounts() |
void |
setNewChunkListener(NewChunkListener listener) |
protected boolean |
threadSafetyCheck(boolean isUsed) |
FileLock |
tryLock(long position,
long size,
boolean shared)
Calls tryLock on the underlying file channel
|
static void |
warmup() |
acquireBytesForRead, acquireBytesForRead, acquireBytesForWrite, acquireBytesForWrite, acquireByteStore, acquireByteStore, canReleaseInBackground, file, internalizedToken, mappedFile, mappedFile, mappedFile, mappedFile, mappedFile, mappedFile, of, ofSingle, readOnly, readOnly
backgroundPerformRelease, close, isClosed, release, releaseLast, reserve, reserveTransfer, setClosed, setClosing, throwExceptionIfClosed, throwExceptionIfClosedInSetter, tryReserve
assertReferencesReleased, clearUsedByThread, createdHere, disableReferenceTracing, enableReferenceTracing, refCount, referenceId, reservedBy, throwExceptionIfNotReleased, throwExceptionIfReleased, toString, unmonitor, warnAndReleaseIfNotReleased
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public ChunkedMappedFile(@NotNull @NotNull File file, @NotNull @NotNull RandomAccessFile raf, long chunkSize, long overlapSize, long capacity, boolean readOnly) throws net.openhft.chronicle.core.io.IORuntimeException
net.openhft.chronicle.core.io.IORuntimeException
public static void warmup()
@NotNull public @NotNull MappedBytesStore acquireByteStore(net.openhft.chronicle.core.io.ReferenceOwner owner, long position, BytesStore oldByteStore, @NotNull @NotNull MappedBytesStoreFactory mappedBytesStoreFactory) throws IOException, IllegalArgumentException, IllegalStateException
acquireByteStore
in class MappedFile
IOException
IllegalArgumentException
IllegalStateException
protected void performRelease()
performRelease
in class net.openhft.chronicle.core.io.AbstractReferenceCounted
@NotNull public @NotNull String referenceCounts()
referenceCounts
in class MappedFile
public long capacity()
capacity
in class MappedFile
public long chunkSize()
chunkSize
in class MappedFile
public long overlapSize()
overlapSize
in class MappedFile
public NewChunkListener getNewChunkListener()
getNewChunkListener
in class MappedFile
public void setNewChunkListener(NewChunkListener listener)
setNewChunkListener
in class MappedFile
public long actualSize() throws net.openhft.chronicle.core.io.IORuntimeException, IllegalStateException
actualSize
in class MappedFile
net.openhft.chronicle.core.io.IORuntimeException
IllegalStateException
@NotNull public @NotNull RandomAccessFile raf()
raf
in class MappedFile
@Deprecated protected void finalize() throws Throwable
finalize
in class MappedFile
Throwable
protected boolean threadSafetyCheck(boolean isUsed)
threadSafetyCheck
in class MappedFile
public FileLock lock(long position, long size, boolean shared) throws IOException
lock
in class MappedFile
IOException
public FileLock tryLock(long position, long size, boolean shared) throws IOException
tryLock
in class MappedFile
IOException
public long chunkCount()
chunkCount
in class MappedFile
public void chunkCount(long[] chunkCount)
chunkCount
in class MappedFile
public MappedBytes createBytesFor()
createBytesFor
in class MappedFile
Copyright © 2022. All rights reserved.