org.apache.jackrabbit.mk.store
Interface RevisionStore

All Superinterfaces:
RevisionProvider
All Known Implementing Classes:
DefaultRevisionStore

public interface RevisionStore
extends RevisionProvider

Write operations.


Nested Class Summary
static class RevisionStore.PutToken
          Token that must be created first before invoking any put operation.
 
Method Summary
 RevisionStore.PutToken createPutToken()
          Create a put token.
 void lockHead()
          Lock the head.
 Id putCNEMap(RevisionStore.PutToken token, ChildNodeEntries map)
           
 Id putCommit(RevisionStore.PutToken token, MutableCommit commit)
          Store a new commit.
 Id putHeadCommit(RevisionStore.PutToken token, MutableCommit commit, Id branchRootId, Id branchRevId)
          Put a new head commit.
 Id putNode(RevisionStore.PutToken token, MutableNode node)
           
 void unlockHead()
          Unlock the head.
 
Methods inherited from interface org.apache.jackrabbit.mk.store.RevisionProvider
getCNEMap, getCommit, getHeadCommit, getHeadCommitId, getNode, getRootNode
 

Method Detail

createPutToken

RevisionStore.PutToken createPutToken()
Create a put token.

Returns:
put token

putNode

Id putNode(RevisionStore.PutToken token,
           MutableNode node)
           throws Exception
Throws:
Exception

putCNEMap

Id putCNEMap(RevisionStore.PutToken token,
             ChildNodeEntries map)
             throws Exception
Throws:
Exception

lockHead

void lockHead()
Lock the head. Must be called prior to putting a new head commit.

See Also:
putHeadCommit(PutToken, MutableCommit, Id, Id), unlockHead()

putHeadCommit

Id putHeadCommit(RevisionStore.PutToken token,
                 MutableCommit commit,
                 Id branchRootId,
                 Id branchRevId)
                 throws Exception
Put a new head commit. Must be called while holding a lock on the head.

Parameters:
token - put token
commit - commit
branchRootId - former branch root id, if this is a merge; otherwise null
branchRevId - current branch head, i.e. last commit on this branch, if this is a merge; otherwise null
Returns:
head commit id
Throws:
Exception - if an error occurs
See Also:
lockHead()

unlockHead

void unlockHead()
Unlock the head.

See Also:
lockHead()

putCommit

Id putCommit(RevisionStore.PutToken token,
             MutableCommit commit)
             throws Exception
Store a new commit.

Unlike putHeadCommit(MutableCommit), this method does not affect the current head commit and therefore doesn't require a lock on the head.

Parameters:
token - put token
commit - commit
Returns:
new commit id
Throws:
Exception - if an error occurs


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