org.apache.jackrabbit.mk.persistence
Class FSPersistence

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

public class FSPersistence
extends Object
implements Persistence


Constructor Summary
FSPersistence(File homeDir)
           
 
Method Summary
 void initialize()
           
 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

FSPersistence

public FSPersistence(File homeDir)
Method Detail

initialize

public void initialize()
                throws Exception
Throws:
Exception

readHead

public Id readHead()
            throws Exception
Specified by:
readHead in interface Persistence
Throws:
Exception

writeHead

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

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,
                               Exception
Specified by:
readCommit in interface Persistence
Throws:
NotFoundException
Exception

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,
                                      Exception
Specified by:
readCNEMap in interface Persistence
Throws:
NotFoundException
Exception

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.