Modifier and Type | Class and Description |
---|---|
static class |
PagedFileStorage.StorageLock |
static class |
PagedFileStorage.StorageLockContext |
Modifier and Type | Field and Description |
---|---|
static int |
BUFFER_SIZE |
static int |
MB |
protected int |
myPageSize |
protected long |
mySize |
protected boolean |
myValuesAreBufferAligned |
Constructor and Description |
---|
PagedFileStorage(java.nio.file.Path file,
PagedFileStorage.StorageLockContext storageLockContext,
int pageSize,
boolean valuesAreBufferAligned,
boolean nativeBytesOrder) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
force() |
byte |
get(long index) |
void |
get(long index,
byte[] dst,
int offset,
int length) |
byte |
getByte(long addr) |
java.nio.file.Path |
getFile() |
int |
getInt(long addr) |
long |
getLong(long addr) |
short |
getShort(long addr) |
PagedFileStorage.StorageLockContext |
getStorageLockContext() |
boolean |
isDirty() |
long |
length() |
void |
lock() |
void |
put(long index,
byte value) |
void |
put(long index,
byte[] src,
int offset,
int length) |
void |
putByte(long addr,
byte b) |
void |
putInt(long addr,
int value) |
void |
putLong(long addr,
long value) |
void |
putShort(long addr,
short value) |
void |
resize(long newSize) |
void |
unlock() |
public static final int MB
public static final int BUFFER_SIZE
protected volatile long mySize
protected final int myPageSize
protected final boolean myValuesAreBufferAligned
public PagedFileStorage(java.nio.file.Path file, PagedFileStorage.StorageLockContext storageLockContext, int pageSize, boolean valuesAreBufferAligned, boolean nativeBytesOrder)
public void lock()
public void unlock()
public PagedFileStorage.StorageLockContext getStorageLockContext()
public java.nio.file.Path getFile()
public void putInt(long addr, int value)
public int getInt(long addr)
public final void putShort(long addr, short value)
public final short getShort(long addr)
public void putLong(long addr, long value)
public void putByte(long addr, byte b)
public byte getByte(long addr)
public long getLong(long addr)
public byte get(long index)
public void put(long index, byte value)
public void get(long index, byte[] dst, int offset, int length)
public void put(long index, byte[] src, int offset, int length)
public void close()
public void resize(long newSize) throws java.io.IOException
java.io.IOException
public final long length()