|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.mk.persistence.H2Persistence
public class H2Persistence
| Constructor Summary | |
|---|---|
H2Persistence()
|
|
| 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[] |
readIds()
Return an array of ids, where the first is the head id (as stored with Persistence.writeHead(Id)) and the second is the highest commit
id found or null. |
void |
readNode(StoredNode node)
Read a node from storage. |
void |
replaceCommit(Id id,
Commit commit)
Replace a commit. |
void |
start()
Start a GC cycle. |
int |
sweep()
Sweep all objects that are not marked and were written before the GC started. |
Id |
writeCNEMap(ChildNodeEntries 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 H2Persistence()
| Method Detail |
|---|
public void initialize(File homeDir)
throws Exception
initialize in interface PersistenceExceptionpublic void close()
close in interface Closeable
public Id[] readIds()
throws Exception
PersistencePersistence.writeHead(Id)) and the second is the highest commit
id found or null.
This method is not guaranteed to deliver "live" results, after
something is written to the storage, so it should better be used
once after initialization.
readIds in interface PersistenceException - if an error occurs
public void writeHead(Id id)
throws Exception
writeHead in interface PersistenceException
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(ChildNodeEntries map)
throws Exception
writeCNEMap in interface PersistenceExceptionpublic void start()
GCPersistenceGCPersistence.sweep().
start in interface GCPersistence
public boolean markCommit(Id id)
throws Exception
GCPersistence
markCommit in interface GCPersistenceid - commit id
true if the commit was not marked before;
false otherwise
Exception - if an error occurs
public void replaceCommit(Id id,
Commit commit)
throws Exception
GCPersistence
replaceCommit in interface GCPersistenceid - commit id
Exception - if an error occurs
public boolean markNode(Id id)
throws Exception
GCPersistence
markNode in interface GCPersistenceid - node id
true if the node was not marked before;
false otherwise
Exception - if an error occurs
public boolean markCNEMap(Id id)
throws Exception
GCPersistence
markCNEMap in interface GCPersistenceid - child node entry map id
true if the child node entry map was not marked before;
false otherwise
Exception - if an error occurs
public int sweep()
throws Exception
GCPersistence
sweep in interface GCPersistence-1 if number is unknown
Exception - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||