public class MappedFile
extends net.openhft.chronicle.core.io.AbstractCloseableReferenceCounted
Modifier | Constructor and Description |
---|---|
protected |
MappedFile(@NotNull File file,
@NotNull RandomAccessFile raf,
long chunkSize,
long overlapSize,
long capacity,
boolean readOnly) |
Modifier and Type | Method and Description |
---|---|
@NotNull Bytes |
acquireBytesForRead(net.openhft.chronicle.core.io.ReferenceOwner owner,
long position)
Convenience method so you don't need to release the BytesStore
|
void |
acquireBytesForRead(net.openhft.chronicle.core.io.ReferenceOwner owner,
long position,
@NotNull VanillaBytes bytes) |
@NotNull Bytes |
acquireBytesForWrite(net.openhft.chronicle.core.io.ReferenceOwner owner,
long position) |
void |
acquireBytesForWrite(net.openhft.chronicle.core.io.ReferenceOwner owner,
long position,
@NotNull VanillaBytes bytes) |
@NotNull MappedBytesStore |
acquireByteStore(net.openhft.chronicle.core.io.ReferenceOwner owner,
long position) |
@NotNull MappedBytesStore |
acquireByteStore(net.openhft.chronicle.core.io.ReferenceOwner owner,
long position,
BytesStore oldByteStore) |
@NotNull MappedBytesStore |
acquireByteStore(net.openhft.chronicle.core.io.ReferenceOwner owner,
long position,
BytesStore oldByteStore,
@NotNull MappedBytesStoreFactory mappedBytesStoreFactory) |
long |
actualSize() |
long |
capacity() |
long |
chunkSize() |
@NotNull File |
file() |
protected void |
finalize() |
NewChunkListener |
getNewChunkListener() |
static @NotNull MappedFile |
mappedFile(@NotNull File file,
long chunkSize) |
static @NotNull MappedFile |
mappedFile(@NotNull File file,
long chunkSize,
long overlapSize) |
static @NotNull MappedFile |
mappedFile(@NotNull File file,
long chunkSize,
long overlapSize,
boolean readOnly) |
static @NotNull MappedFile |
mappedFile(@NotNull File file,
long capacity,
long chunkSize,
long overlapSize,
boolean readOnly) |
static @NotNull MappedFile |
mappedFile(@NotNull String filename,
long chunkSize) |
static @NotNull MappedFile |
mappedFile(@NotNull String filename,
long chunkSize,
long overlapSize) |
static @NotNull MappedFile |
of(@NotNull File file,
long chunkSize,
long overlapSize,
boolean readOnly) |
long |
overlapSize() |
protected void |
performRelease() |
protected boolean |
performReleaseInBackground() |
@NotNull RandomAccessFile |
raf() |
static @NotNull MappedFile |
readOnly(@NotNull File file) |
@NotNull String |
referenceCounts() |
void |
setNewChunkListener(NewChunkListener listener) |
protected boolean |
threadSafetyCheck(boolean isUsed) |
static void |
warmup() |
close, isClosed, release, releaseLast, reserve, reserveTransfer, setClosed, throwExceptionIfClosed, throwExceptionIfClosedInSetter, tryReserve
assertReferencesReleased, createdHere, disableReferenceTracing, enableReferenceTracing, refCount, referenceId, reservedBy, throwExceptionIfNotReleased, throwExceptionIfReleased, toString, unmonitor, warnAndReleaseIfNotReleased
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
protected MappedFile(@NotNull @NotNull File file, @NotNull @NotNull RandomAccessFile raf, long chunkSize, long overlapSize, long capacity, boolean readOnly)
@NotNull public static @NotNull MappedFile of(@NotNull @NotNull File file, long chunkSize, long overlapSize, boolean readOnly) throws FileNotFoundException
FileNotFoundException
@NotNull public static @NotNull MappedFile mappedFile(@NotNull @NotNull File file, long chunkSize) throws FileNotFoundException
FileNotFoundException
@NotNull public static @NotNull MappedFile mappedFile(@NotNull @NotNull String filename, long chunkSize) throws FileNotFoundException
FileNotFoundException
@NotNull public static @NotNull MappedFile mappedFile(@NotNull @NotNull String filename, long chunkSize, long overlapSize) throws FileNotFoundException
FileNotFoundException
@NotNull public static @NotNull MappedFile mappedFile(@NotNull @NotNull File file, long chunkSize, long overlapSize) throws FileNotFoundException
FileNotFoundException
@NotNull public static @NotNull MappedFile mappedFile(@NotNull @NotNull File file, long chunkSize, long overlapSize, boolean readOnly) throws FileNotFoundException
FileNotFoundException
@NotNull public static @NotNull MappedFile readOnly(@NotNull @NotNull File file) throws FileNotFoundException
FileNotFoundException
@NotNull public static @NotNull MappedFile mappedFile(@NotNull @NotNull File file, long capacity, long chunkSize, long overlapSize, boolean readOnly) throws IOException
IOException
public static void warmup()
@NotNull public @NotNull File file()
@NotNull public @NotNull MappedBytesStore acquireByteStore(net.openhft.chronicle.core.io.ReferenceOwner owner, long position) throws IOException, IllegalArgumentException, IllegalStateException
IllegalStateException
- if closed.IOException
IllegalArgumentException
@NotNull public @NotNull MappedBytesStore acquireByteStore(net.openhft.chronicle.core.io.ReferenceOwner owner, long position, BytesStore oldByteStore) throws IOException, IllegalArgumentException, IllegalStateException
@NotNull public @NotNull MappedBytesStore acquireByteStore(net.openhft.chronicle.core.io.ReferenceOwner owner, long position, BytesStore oldByteStore, @NotNull @NotNull MappedBytesStoreFactory mappedBytesStoreFactory) throws IOException, IllegalArgumentException, IllegalStateException
@NotNull public @NotNull Bytes acquireBytesForRead(net.openhft.chronicle.core.io.ReferenceOwner owner, long position) throws IOException, IllegalStateException, IllegalArgumentException
public void acquireBytesForRead(net.openhft.chronicle.core.io.ReferenceOwner owner, long position, @NotNull @NotNull VanillaBytes bytes) throws IOException, IllegalStateException, IllegalArgumentException
@NotNull public @NotNull Bytes acquireBytesForWrite(net.openhft.chronicle.core.io.ReferenceOwner owner, long position) throws IOException, IllegalStateException, IllegalArgumentException
public void acquireBytesForWrite(net.openhft.chronicle.core.io.ReferenceOwner owner, long position, @NotNull @NotNull VanillaBytes bytes) throws IOException, IllegalStateException, IllegalArgumentException
protected boolean performReleaseInBackground()
performReleaseInBackground
in class net.openhft.chronicle.core.io.AbstractReferenceCounted
protected void performRelease()
performRelease
in class net.openhft.chronicle.core.io.AbstractReferenceCounted
@NotNull public @NotNull String referenceCounts()
public long capacity()
public long chunkSize()
public long overlapSize()
public NewChunkListener getNewChunkListener()
public void setNewChunkListener(NewChunkListener listener)
public long actualSize() throws net.openhft.chronicle.core.io.IORuntimeException
net.openhft.chronicle.core.io.IORuntimeException
@NotNull public @NotNull RandomAccessFile raf()
protected void finalize() throws Throwable
protected boolean threadSafetyCheck(boolean isUsed)
threadSafetyCheck
in class net.openhft.chronicle.core.io.AbstractReferenceCounted
Copyright © 2020. All rights reserved.