|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PersistenceManager
Persistence manager interface. Persistence managers are internal Jackrabbit components that handle the persistent storage of content nodes and properties. A persistence manager knows how to retrieve the persistent states of content items and how to atomically save a set of changes to the persistent state.
Each workspace of a Jackrabbit content repository uses separate persistence manager to store the content in that workspace. Also the Jackrabbit version handler uses a separate persistence manager. The persistence managers in use are configured in the Jackrabbit XML configuration files. The configured persistence managers are instantiated and initialized using the JavaBeans conventions.
The life cycle of a persistence manager instance contains four phases:
init
method
is invoked to bind the persistence manager with a given
context
.
close
method is invoked
to close the persistence manager and release all acquired
resources.
Method Summary | |
---|---|
void |
checkConsistency(String[] uuids,
boolean recursive,
boolean fix)
Perform a consistency check of the data. |
void |
close()
Closes the persistence manager. |
NodeState |
createNew(NodeId id)
Creates a new node state instance with the given id. |
PropertyState |
createNew(PropertyId id)
Creates a new property state instance with the given id. |
boolean |
exists(NodeId id)
Checks whether the identified node exists. |
boolean |
exists(PropertyId id)
Checks whether the identified property exists. |
boolean |
existsReferencesTo(NodeId targetId)
Checks whether references of the identified target node exist. |
void |
init(PMContext context)
Initializes the persistence manager. |
NodeState |
load(NodeId id)
Load the persistent members of a node state. |
PropertyState |
load(PropertyId id)
Load the persistent members of a property state. |
NodeReferences |
loadReferencesTo(NodeId id)
Load the persisted references to the node with the given identifier. |
void |
store(ChangeLog changeLog)
Atomically saves the given set of changes. |
Method Detail |
---|
void init(PMContext context) throws Exception
An appropriate exception is thrown if the persistence manager initialization fails for whatever reason. In this case the state of the persistence manager is undefined and the instance should be discarded.
context
- persistence manager context
Exception
- if the persistence manager initialization failedvoid close() throws Exception
An appropriate exception is thrown if the persistence manager could not be closed properly. In this case the state of the persistence manager is undefined and the instance should be discarded.
Exception
- if the persistence manager failed to close properlyNodeState createNew(NodeId id)
id
- node id
PropertyState createNew(PropertyId id)
id
- property id
NodeState load(NodeId id) throws NoSuchItemStateException, ItemStateException
id
- node id
NoSuchItemStateException
- if the node state does not exist
ItemStateException
- if another error occursPropertyState load(PropertyId id) throws NoSuchItemStateException, ItemStateException
id
- property id
NoSuchItemStateException
- if the property state does not exist
ItemStateException
- if another error occursNodeReferences loadReferencesTo(NodeId id) throws NoSuchItemStateException, ItemStateException
id
- reference target node id
NoSuchItemStateException
- if the target node does not exist
ItemStateException
- if another error occursboolean exists(NodeId id) throws ItemStateException
id
- node id
true
if the node exists,
false
otherwise
ItemStateException
- on persistence manager errorsboolean exists(PropertyId id) throws ItemStateException
id
- property id
true
if the property exists,
false
otherwise
ItemStateException
- on persistence manager errorsboolean existsReferencesTo(NodeId targetId) throws ItemStateException
targetId
- target node id
true
if the references exist,
false
otherwise
ItemStateException
- on persistence manager errorsvoid store(ChangeLog changeLog) throws ItemStateException
changeLog
- change log containing states that were changed
ItemStateException
- if the changes could not be savedvoid checkConsistency(String[] uuids, boolean recursive, boolean fix)
uuids
- list of UUIDs of nodes to be checked. if null, all nodes will
be checkedrecursive
- if true, the tree(s) below the given node(s) will be traversed
and checked as wellfix
- if true, any problems found that can be repaired will be
repaired. if false, no data will be modified, instead all
inconsistencies will only get logged
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |