org.apache.jackrabbit.mk.persistence
Interface Persistence

All Superinterfaces:
Closeable
All Known Subinterfaces:
GCPersistence
All Known Implementing Classes:
BDbPersistence, FSPersistence, H2Persistence, InMemPersistence, MongoPersistence

public interface Persistence
extends Closeable

Defines the methods exposed by a persistence manager, that stores head revision id, nodes, child node entries and blobs.


Method Summary
 void initialize(File homeDir)
           
 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 provided by the caller.
 void writeHead(Id id)
           
 Id writeNode(Node node)
           
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

initialize

void initialize(File homeDir)
                throws Exception
Throws:
Exception

readHead

Id readHead()
            throws Exception
Throws:
Exception

writeHead

void writeHead(Id id)
               throws Exception
Throws:
Exception

readNode

void readNode(StoredNode node)
              throws NotFoundException,
                     Exception
Read a node from storage.

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

Id writeNode(Node node)
             throws Exception
Throws:
Exception

readCNEMap

ChildNodeEntriesMap readCNEMap(Id id)
                               throws NotFoundException,
                                      Exception
Throws:
NotFoundException
Exception

writeCNEMap

Id writeCNEMap(ChildNodeEntriesMap map)
               throws Exception
Throws:
Exception

readCommit

StoredCommit readCommit(Id id)
                        throws NotFoundException,
                               Exception
Throws:
NotFoundException
Exception

writeCommit

void writeCommit(Id id,
                 Commit commit)
                 throws Exception
Persist a commit with an id provided by the caller.

Parameters:
id - commit id
commit - commit
Throws:
Exception - if an error occurs


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