|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.mk.persistence.InMemPersistence
public class InMemPersistence
| Constructor Summary | |
|---|---|
InMemPersistence()
|
|
| Method Summary | |
|---|---|
void |
close()
|
void |
initialize(File homeDir)
|
boolean |
markCNEMap(Id id)
Mark a child node entry map. |
boolean |
markCommit(Id id)
Mark a commit. |
boolean |
markNode(Id id)
Mark a node. |
ChildNodeEntriesMap |
readCNEMap(Id id)
|
StoredCommit |
readCommit(Id id)
|
Id |
readHead()
|
void |
readNode(StoredNode node)
Read a node from storage. |
void |
replaceCommit(Id id,
Commit commit)
Replace a commit. |
void |
start()
Start a GC cycle. |
void |
sweep()
Sweep all objects that are not marked and were written before the GC started. |
Id |
writeCNEMap(ChildNodeEntriesMap map)
|
void |
writeCommit(Id id,
Commit commit)
Persist a commit with an id provided by the caller. |
void |
writeHead(Id id)
|
Id |
writeNode(Node node)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InMemPersistence()
| Method Detail |
|---|
public void initialize(File homeDir)
initialize in interface Persistencepublic Id readHead()
readHead in interface Persistencepublic void writeHead(Id id)
writeHead in interface Persistence
public void readNode(StoredNode node)
throws NotFoundException,
Exception
Persistence
readNode in interface Persistencenode - node to read, with id given in StoredNode.getId()
NotFoundException - if no such node is found
Exception - if some other error occurs
public Id writeNode(Node node)
throws Exception
writeNode in interface PersistenceException
public StoredCommit readCommit(Id id)
throws NotFoundException,
Exception
readCommit in interface PersistenceNotFoundException
Exception
public void writeCommit(Id id,
Commit commit)
throws Exception
Persistence
writeCommit in interface Persistenceid - commit idcommit - commit
Exception - if an error occurs
public ChildNodeEntriesMap readCNEMap(Id id)
throws NotFoundException,
Exception
readCNEMap in interface PersistenceNotFoundException
Exception
public Id writeCNEMap(ChildNodeEntriesMap map)
throws Exception
writeCNEMap in interface PersistenceExceptionpublic void close()
close in interface Closeablepublic void start()
GCPersistenceGCPersistence.sweep().
start in interface GCPersistence
public boolean markCommit(Id id)
throws NotFoundException
GCPersistence
markCommit in interface GCPersistenceid - commit id
true if the commit was not marked before;
false otherwise
NotFoundException
public boolean markNode(Id id)
throws NotFoundException
GCPersistence
markNode in interface GCPersistenceid - node id
true if the node was not marked before;
false otherwise
NotFoundException
public boolean markCNEMap(Id id)
throws NotFoundException
GCPersistence
markCNEMap in interface GCPersistenceid - child node entry map id
true if the child node entry map was not marked before;
false otherwise
NotFoundException
public void replaceCommit(Id id,
Commit commit)
throws Exception
GCPersistence
replaceCommit in interface GCPersistenceid - commit id
Exception - if an error occurspublic void sweep()
GCPersistence
sweep in interface GCPersistence
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||