public class MappedFile extends Object
Constructor and Description |
---|
MappedFile(String filename,
long blockSize) |
MappedFile(String filename,
long blockSize,
long overlapSize) |
Modifier and Type | Method and Description |
---|---|
MappedMemory |
acquire(long index) |
long |
blockSize() |
void |
close() |
static MappedByteBuffer |
getMap(FileChannel fileChannel,
long start,
int size) |
int |
getRefCount(long index)
gets the refCount a given index, or returns 0, if the there is no mapping for this index
|
String |
name() |
void |
release(MappedMemory mappedMemory) |
long |
size() |
public MappedFile(String filename, long blockSize) throws FileNotFoundException
FileNotFoundException
public MappedFile(String filename, long blockSize, long overlapSize) throws FileNotFoundException
FileNotFoundException
public static MappedByteBuffer getMap(@NotNull FileChannel fileChannel, long start, int size) throws IOException
IOException
public String name()
public MappedMemory acquire(long index) throws IOException
IOException
public int getRefCount(long index)
index
- index
IndexOutOfBoundsException
- if the index is out of rangepublic void close() throws IOException
IOException
public long size()
public long blockSize()
public void release(MappedMemory mappedMemory)
Copyright © 2019. All rights reserved.