|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deckfour.xes.nikefs2.NikeFS2VirtualFileSystem
public class NikeFS2VirtualFileSystem
Virtual file system authority, managing swap files and virtual file abstractions. Implements the storage provider interface for use by file abstractions, and performs cleanup after a shutdown of the host application. This class must be used as a singleton. There is no need for multiple virtual file systems per application. A single VFS instance operates with maximum efficiency, and guarantees that no data corruption or swap loss will occur.
Field Summary | |
---|---|
protected List<NikeFS2BlockProvider> |
blockProviders
List of block providers, i.e. |
protected int |
blockSize
Block size, in bytes, of virtual storage blocks. |
protected static NikeFS2VirtualFileSystem |
instance
The singleton VFS instance. |
protected int |
swapFileSize
Size of swap files which are used to provide blocks. |
protected boolean |
useLazyCopies
Flag determining whether to use soft copies for virtual file duplication. |
Method Summary | |
---|---|
NikeFS2Block |
allocateBlock()
Allocates a new virtual storage block from this virtual file system instance. |
int |
blockSize()
Returns the block size of this VFS. |
NikeFS2RandomAccessStorage |
createStorage()
Creates a new empty random access storage, which is suitable for storing byte sequences and primitive data types. |
static NikeFS2VirtualFileSystem |
instance()
Singleton access method. |
void |
setBlockSize(int bytes)
Sets the block size of the virtual file system. |
void |
setSwapFileSize(int bytes)
Sets the swap file size of the virtual file system. |
void |
setUseLazyCopies(boolean useLazyCopies)
Sets this VFS's property of whether to use soft copies for virtual file duplication. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static NikeFS2VirtualFileSystem instance
protected int blockSize
protected int swapFileSize
protected boolean useLazyCopies
true
.
protected List<NikeFS2BlockProvider> blockProviders
Method Detail |
---|
public static NikeFS2VirtualFileSystem instance()
public void setUseLazyCopies(boolean useLazyCopies)
useLazyCopies
- Whether to use soft copies
for virtual file duplication.public void setSwapFileSize(int bytes)
bytes
- Size of swap files, in bytes.public void setBlockSize(int bytes)
bytes
- Size of blocks, in bytes.public NikeFS2RandomAccessStorage createStorage() throws IOException
NikeFS2StorageProvider
createStorage
in interface NikeFS2StorageProvider
IOException
public int blockSize()
public NikeFS2Block allocateBlock() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |