|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.planx.xmlstore.koala.io.NodeFileSystemImpl<R>
org.planx.xmlstore.koala.io.CacheNodeFileSystem<R>
public class CacheNodeFileSystem<R extends Locatable>
A NodeFileSystem that caches shared nodes (nodes that have the
isShared flag set to true). This enables efficient loading
and traversal of nodes.
| Constructor Summary | |
|---|---|
CacheNodeFileSystem(FileSystem fs,
IOPolicy<R> policy,
boolean useSoft)
The NodeFileSystem will use a NodeConverter for
converting nodes to and from byte representation. |
|
| Method Summary | |
|---|---|
void |
clear()
Frees all data in this FileSystem. |
void |
free(Bound l)
Frees the space occupied by the specified Bound. |
SystemNode |
load(Locator loc,
RelativeDualReference<Locator,R> ref)
Loads a node from the file system. |
SystemNode |
load(R ref)
Loads a node from the file system. |
Locator |
save(SystemNode node)
Saves at end of the file system by appending (i.e. allocating using NodeFileSystemImpl.allocate()). |
| Methods inherited from class org.planx.xmlstore.koala.io.NodeFileSystemImpl |
|---|
all, allocate, allocate, clearModified, close, getData, getMeta, getPolicy, id, isContained, isModified, isReadOnly, setMeta, setReadOnly, size, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CacheNodeFileSystem(FileSystem fs,
IOPolicy<R> policy,
boolean useSoft)
NodeFileSystem will use a NodeConverter for
converting nodes to and from byte representation.
| Method Detail |
|---|
public SystemNode load(R ref)
throws IOException
NodeFileSystem
load in interface Loader<R extends Locatable,SystemNode>load in interface NodeFileSystem<R extends Locatable>load in class NodeFileSystemImpl<R extends Locatable>IOException
public SystemNode load(Locator loc,
RelativeDualReference<Locator,R> ref)
throws IOException
NodeFileSystem
load in interface NodeFileSystem<R extends Locatable>load in class NodeFileSystemImpl<R extends Locatable>IOException
public Locator save(SystemNode node)
throws IOException
NodeFileSystemImplNodeFileSystemImpl.allocate()).
save in interface NodeFileSystem<R extends Locatable>save in class NodeFileSystemImpl<R extends Locatable>IOException
public void free(Bound l)
throws IOException
FileSystemBound.
free in interface FileSystemfree in class NodeFileSystemImpl<R extends Locatable>IOException - if an I/O error occurred.
InvalidSourceIdException - if the file system identifier of
the locator is invalid.
OutOfBoundsException - if the locator is out of bounds.
public void clear()
throws IOException
FileSystemFileSystem.
clear in interface FileSystemclear in class NodeFileSystemImpl<R extends Locatable>IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||