public class JRConcurrentSwapFile extends JRSwapFile
JRSwapFile
derived class that uses
a FileChannel
to perform concurrent I/O on the
swap file.JRSwapFile.LongQueue, JRSwapFile.SwapHandle
Modifier and Type | Field and Description |
---|---|
static String |
EXCEPTION_MESSAGE_KEY_INSUFFICIENT_DATA |
file, PROPERTY_DELETE_ON_EXIT, swapFile
Constructor and Description |
---|
JRConcurrentSwapFile(String directory,
int blockSize,
int minGrowCount)
Creates a swap file.
|
Modifier and Type | Method and Description |
---|---|
protected void |
read(byte[] data,
int dataOffset,
int dataLength,
long fileOffset) |
String |
toString() |
protected void |
write(byte[] data,
int dataSize,
int dataOffset,
long fileOffset) |
dispose, finalize, free, freeBlocks, read, reserveFreeBlocks, write
public static final String EXCEPTION_MESSAGE_KEY_INSUFFICIENT_DATA
public JRConcurrentSwapFile(String directory, int blockSize, int minGrowCount)
directory
- the directory where the file should be created.blockSize
- the size of the blocks allocated by the swap fileminGrowCount
- the minimum number of blocks by which the swap file grows when fullpublic String toString()
toString
in class JRSwapFile
protected void write(byte[] data, int dataSize, int dataOffset, long fileOffset) throws IOException
write
in class JRSwapFile
IOException
protected void read(byte[] data, int dataOffset, int dataLength, long fileOffset) throws IOException
read
in class JRSwapFile
IOException
Copyright © 2017. All rights reserved.