|
ModeShape Distribution 3.0.0.Beta1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.modeshape.jcr.cache.document.AbstractSessionCache
org.modeshape.jcr.cache.document.ReadOnlySessionCache
@ThreadSafe public class ReadOnlySessionCache

A read-only SessionCache implementation.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.modeshape.jcr.cache.document.AbstractSessionCache |
|---|
AbstractSessionCache.BasicSaveContext |
| Nested classes/interfaces inherited from interface org.modeshape.jcr.cache.SessionCache |
|---|
SessionCache.PreSave, SessionCache.SaveContext |
| Field Summary |
|---|
| Fields inherited from class org.modeshape.jcr.cache.document.AbstractSessionCache |
|---|
workspaceCache |
| Constructor Summary | |
|---|---|
ReadOnlySessionCache(ExecutionContext context,
WorkspaceCache workspaceCache,
SessionEnvironment sessionContext)
|
|
| Method Summary | |
|---|---|
void |
clear()
Clears all changes in the cache. |
void |
clear(CachedNode node)
Clears all changes in the cache that are at or below the supplied node. |
void |
destroy(NodeKey key)
Destroy the subgraph with the supplied node as the top node in the subgraph. |
Set<NodeKey> |
getChangedNodeKeys()
Returns a set with the NodeKeys of the transient nodes from this cache. |
Set<NodeKey> |
getChangedNodeKeysAtOrBelow(CachedNode node)
Returns a set with the NodeKeys of the transient nodes from this cache which are at or below the path of the given
node |
boolean |
hasChanges()
Determine whether this session has any transient, unsaved changes. |
boolean |
isDestroyed(NodeKey key)
Return whether the node with the supplied key has been removed using this session but not yet persisted. |
boolean |
isReadOnly()
Returns whether this cache is readonly. |
SessionNode |
mutable(NodeKey key)
Get a mutable form of the node with the supplied key. |
void |
save()
Saves all changes made within this session. |
void |
save(CachedNode node,
SessionCache otherSession,
SessionCache.PreSave preSaveOperation)
Saves all of this session's changes that were made at or below the specified path. |
void |
save(SessionCache otherSession,
SessionCache.PreSave preSaveOperation)
Saves all changes made within this session and the supplied session, using a single transaction for both. |
String |
toString()
|
| Methods inherited from class org.modeshape.jcr.cache.document.AbstractSessionCache |
|---|
addContextData, createNodeKey, createNodeKey, createNodeKeyWithIdentifier, createNodeKeyWithSource, generateIdentifier, getContext, getNode, getNode, getNodeKeysAtAndBelow, getRootKey, getWorkspace, workspaceCache |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ReadOnlySessionCache(ExecutionContext context,
WorkspaceCache workspaceCache,
SessionEnvironment sessionContext)
| Method Detail |
|---|
public void clear()
NodeCache
public boolean hasChanges()
SessionCache
public Set<NodeKey> getChangedNodeKeys()
SessionCacheNodeKeys of the transient nodes from this cache. Please note that there may be nodes which
have been removed by another session.
Set with the changed keys, or an empty set if
SessionCache.hasChanges() is false. The returned set is a mutable copy of the
underlying set.public Set<NodeKey> getChangedNodeKeysAtOrBelow(CachedNode node)
SessionCacheNodeKeys of the transient nodes from this cache which are at or below the path of the given
node
node - a non-null CachedNode instance
public void clear(CachedNode node)
SessionCache
node - the node at or below which all changes should be cleared; may not be nullpublic void save()
SessionCache
public void save(SessionCache otherSession,
SessionCache.PreSave preSaveOperation)
SessionCache
otherSession - another session whose changes should be saved with this session's changes; may not be nullpreSaveOperation - the set of operations to run against the new and changed nodes prior to saving; may be null
public void save(CachedNode node,
SessionCache otherSession,
SessionCache.PreSave preSaveOperation)
SessionCacheItem.save().
node - the node at or below which all changes should be saved; may not be nullotherSession - another session whose changes should be saved with this session's changes; may not be nullpreSaveOperation - the set of operations to run against the new and changed nodes prior to saving; may be nullpublic SessionNode mutable(NodeKey key)
SessionCache
mutable in interface SessionCachemutable in class AbstractSessionCachekey - the key for the node; may not be null
public boolean isReadOnly()
SessionCache
public void destroy(NodeKey key)
SessionCacheremoved from its parent node.
key - the key for the top node in the subgraph; may not be nullpublic boolean isDestroyed(NodeKey key)
SessionCache
key - the for the node; may not be null
public String toString()
toString in class Object
|
ModeShape Distribution 3.0.0.Beta1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||