|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.jcr.cache.RepositoryCache
public class RepositoryCache
Nested Class Summary | |
---|---|
static interface |
RepositoryCache.ContentInitializer
|
protected class |
RepositoryCache.LocalChangeListener
|
Field Summary | |
---|---|
static RepositoryCache.ContentInitializer |
NO_OP_INITIALIZER
|
Constructor Summary | |
---|---|
RepositoryCache(ExecutionContext context,
SchematicDb database,
RepositoryConfiguration configuration,
RepositoryCache.ContentInitializer initializer,
SessionEnvironment sessionContext,
ChangeBus changeBus,
org.infinispan.manager.CacheContainer workspaceCacheContainer)
|
Method Summary | |
---|---|
protected String |
cacheNameForWorkspace(String workspaceName)
|
void |
completeShutdown()
|
SessionCache |
createSession(ExecutionContext context,
String workspaceName,
boolean readOnly)
Create a session for the workspace with the given name, using the supplied ExecutionContext for the session. |
WorkspaceCache |
createWorkspace(String name)
Create a new workspace in this repository, if the repository is appropriately configured. |
boolean |
destroyWorkspace(String name)
Permanently destroys the workspace with the supplied name, if the repository is appropriately configured. |
String |
getKey()
Get the key for this repository. |
String |
getName()
Get the name for this repository. |
NodeKey |
getRepositoryMetadataDocumentKey()
Get the identifier of the repository's metadata document. |
NodeKey |
getSystemKey()
|
String |
getSystemWorkspaceKey()
|
String |
getSystemWorkspaceName()
|
NodeCache |
getWorkspaceCache(String workspaceName)
Get the NodeCache for the workspace with the given name. |
Set<String> |
getWorkspaceNames()
Get the names of all available workspaces in this repository. |
boolean |
isSystemContentInitialized()
|
long |
largeValueSizeInBytes()
|
protected Name |
name(String name)
|
protected void |
refreshWorkspaces(boolean update)
|
boolean |
register(ChangeSetListener observer)
Register the supplied observer. |
void |
setLargeValueSizeInBytes(long sizeInBytes)
|
void |
startShutdown()
|
boolean |
unregister(ChangeSetListener observer)
Unregister the supplied observer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final RepositoryCache.ContentInitializer NO_OP_INITIALIZER
Constructor Detail |
---|
public RepositoryCache(ExecutionContext context, SchematicDb database, RepositoryConfiguration configuration, RepositoryCache.ContentInitializer initializer, SessionEnvironment sessionContext, ChangeBus changeBus, org.infinispan.manager.CacheContainer workspaceCacheContainer)
Method Detail |
---|
protected Name name(String name)
public void startShutdown()
public void completeShutdown()
public NodeKey getRepositoryMetadataDocumentKey()
public boolean register(ChangeSetListener observer)
Observable
register
in interface Observable
observer
- the observer to be added; may be null
public boolean unregister(ChangeSetListener observer)
Observable
unregister
in interface Observable
observer
- the observer to be removed; may not be null
public void setLargeValueSizeInBytes(long sizeInBytes)
public long largeValueSizeInBytes()
public boolean isSystemContentInitialized()
protected void refreshWorkspaces(boolean update)
public final String getKey()
public final NodeKey getSystemKey()
public final String getSystemWorkspaceKey()
public final String getSystemWorkspaceName()
public final String getName()
public final Set<String> getWorkspaceNames()
protected final String cacheNameForWorkspace(String workspaceName)
public WorkspaceCache createWorkspace(String name)
name
- the workspace name
UnsupportedOperationException
- if this repository was not configured to allow
creation of workspaces
.public boolean destroyWorkspace(String name)
name
- the workspace name
UnsupportedOperationException
- if this repository was not configured to allow
creation (and destruction) of workspaces
.public NodeCache getWorkspaceCache(String workspaceName)
The session maintains a transient set of changes to the workspace content, and these changes are always visible. But additionally any changes to the workspace content saved by other sessions will immediately be visible to this session. Notice that at times the changes persisted by other sessions may cause some of this session's transient state to become invalid. (For example, this session's newly-created child of some node, A, may become invalid or inaccessible if some other session saved a deletion of node A.)
workspaceName
- the name of the workspace; may not be null
WorkspaceNotFoundException
- if no such workspace existspublic SessionCache createSession(ExecutionContext context, String workspaceName, boolean readOnly)
context
- the context for the new session; may not be nullworkspaceName
- the name of the workspace; may not be nullreadOnly
- true if the session is to be read-only
WorkspaceNotFoundException
- if no such workspace exists
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |