org.apache.jackrabbit.mk.persistence
Class InMemPersistence

java.lang.Object
  extended by org.apache.jackrabbit.mk.persistence.InMemPersistence
All Implemented Interfaces:
Persistence

public class InMemPersistence
extends Object
implements Persistence


Constructor Summary
InMemPersistence()
           
 
Method Summary
 ChildNodeEntriesMap readCNEMap(Id id)
           
 StoredCommit readCommit(Id id)
           
 Id readHead()
           
 void readNode(StoredNode node)
          Read a node from storage.
 Id writeCNEMap(ChildNodeEntriesMap map)
           
 void writeCommit(Id id, Commit commit)
          Persist a commit, with an id that is selected 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

InMemPersistence

public InMemPersistence()
Method Detail

readHead

public Id readHead()
Specified by:
readHead in interface Persistence

writeHead

public void writeHead(Id id)
Specified by:
writeHead in interface Persistence

readNode

public void readNode(StoredNode node)
              throws NotFoundException,
                     Exception
Description copied from interface: Persistence
Read a node from storage.

Specified by:
readNode in interface Persistence
Parameters:
node - node to read, with id given in StoredNode.getId()
Throws:
NotFoundException - if no such node is found
Exception - if some other error occurs

writeNode

public Id writeNode(Node node)
             throws Exception
Specified by:
writeNode in interface Persistence
Throws:
Exception

readCommit

public StoredCommit readCommit(Id id)
                        throws NotFoundException
Specified by:
readCommit in interface Persistence
Throws:
NotFoundException

writeCommit

public void writeCommit(Id id,
                        Commit commit)
                 throws Exception
Description copied from interface: Persistence
Persist a commit, with an id that is selected by the caller.

Specified by:
writeCommit in interface Persistence
Parameters:
id - commit id
commit - commit
Throws:
Exception - if an error occurs

readCNEMap

public ChildNodeEntriesMap readCNEMap(Id id)
                               throws NotFoundException
Specified by:
readCNEMap in interface Persistence
Throws:
NotFoundException

writeCNEMap

public Id writeCNEMap(ChildNodeEntriesMap map)
               throws Exception
Specified by:
writeCNEMap in interface Persistence
Throws:
Exception


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.