Package org.apache.jackrabbit.core
Class RepositoryImpl.WorkspaceInfo
- java.lang.Object
-
- org.apache.jackrabbit.core.RepositoryImpl.WorkspaceInfo
-
- All Implemented Interfaces:
UpdateEventListener
- Enclosing class:
- RepositoryImpl
public class RepositoryImpl.WorkspaceInfo extends Object implements UpdateEventListener
WorkspaceInfo
holds the objects that are shared among multiple per-sessionWorkspaceImpl
instances representing the same named workspace, i.e. the same physical storage.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
WorkspaceInfo(WorkspaceConfig config)
Creates a newWorkspaceInfo
based on the givenconfig
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected LockManagerImpl
createLockManager()
Create a new lock manager.protected void
doDispose()
Does the actual disposal.protected void
doInitialize()
Does the actual initialization work.protected void
doPostInitialize()
Initializes the search manager of this workspace info.protected void
doVersionRecovery()
If necessary, recover from a lost version history.void
externalUpdate(ChangeLog external, List<EventState> events, long timestamp, String userData)
Handle an external update.WorkspaceConfig
getConfig()
Returns the workspace configuration.protected FileSystem
getFileSystem()
Returns the workspace file system.protected SharedItemStateManager
getItemStateProvider()
Returns the workspace item state providerprotected LockManagerImpl
getLockManager()
Returns the lock manager for this workspace.protected String
getName()
Returns the workspace name.protected ObservationDispatcher
getObservationDispatcher()
Returns the observation dispatcher for this workspacePersistenceManager
getPersistenceManager()
Returns the workspace persistence manager.protected RetentionRegistry
getRetentionRegistry()
Return manager used for evaluating effect retention and holds.protected SearchManager
getSearchManager()
Returns the search manager for this workspace.protected org.apache.jackrabbit.core.SystemSession
getSystemSession()
Returns the system session for this workspace.boolean
isActive()
protected boolean
isInitialized()
Returnstrue
if this workspace info is initialized, otherwise returnsfalse
.void
setActive(boolean active)
-
-
-
Constructor Detail
-
WorkspaceInfo
protected WorkspaceInfo(WorkspaceConfig config)
Creates a newWorkspaceInfo
based on the givenconfig
.- Parameters:
config
- workspace configuration
-
-
Method Detail
-
getName
protected String getName()
Returns the workspace name.- Returns:
- the workspace name
-
getConfig
public WorkspaceConfig getConfig()
Returns the workspace configuration.- Returns:
- the workspace configuration
-
isInitialized
protected final boolean isInitialized()
Returnstrue
if this workspace info is initialized, otherwise returnsfalse
.- Returns:
true
if this workspace info is initialized.
-
isActive
public boolean isActive()
-
setActive
public void setActive(boolean active)
-
getFileSystem
protected FileSystem getFileSystem()
Returns the workspace file system.- Returns:
- the workspace file system
-
getPersistenceManager
public PersistenceManager getPersistenceManager() throws RepositoryException
Returns the workspace persistence manager.- Returns:
- the workspace persistence manager
- Throws:
RepositoryException
- if the persistence manager could not be instantiated/initialized
-
getItemStateProvider
protected SharedItemStateManager getItemStateProvider() throws RepositoryException
Returns the workspace item state provider- Returns:
- the workspace item state provider
- Throws:
RepositoryException
- if the workspace item state provider could not be created
-
getObservationDispatcher
protected ObservationDispatcher getObservationDispatcher()
Returns the observation dispatcher for this workspace- Returns:
- the observation dispatcher for this workspace
-
getSearchManager
protected SearchManager getSearchManager() throws RepositoryException
Returns the search manager for this workspace.- Returns:
- the search manager for this workspace, or
null
if noSearchManager
- Throws:
RepositoryException
- if the search manager could not be created
-
getLockManager
protected LockManagerImpl getLockManager() throws RepositoryException
Returns the lock manager for this workspace.- Returns:
- the lock manager for this workspace
- Throws:
RepositoryException
- if the lock manager could not be created
-
createLockManager
protected LockManagerImpl createLockManager() throws RepositoryException
Create a new lock manager. This method is only called once within getLockManager().- Returns:
- the lock manager
- Throws:
RepositoryException
-
getRetentionRegistry
protected RetentionRegistry getRetentionRegistry() throws RepositoryException
Return manager used for evaluating effect retention and holds.- Returns:
- Throws:
RepositoryException
-
getSystemSession
protected org.apache.jackrabbit.core.SystemSession getSystemSession() throws RepositoryException
Returns the system session for this workspace.- Returns:
- the system session for this workspace
- Throws:
RepositoryException
- if the system session could not be created
-
doInitialize
protected void doInitialize() throws RepositoryException
Does the actual initialization work. assumes holding write lock.- Throws:
RepositoryException
- if an error occurs.
-
doVersionRecovery
protected void doVersionRecovery() throws RepositoryException
If necessary, recover from a lost version history.- Throws:
RepositoryException
-
doPostInitialize
protected void doPostInitialize() throws RepositoryException
Initializes the search manager of this workspace info. This method is called while still holding the write lock on this workspace info, butinitialized
is already set totrue
.- Throws:
RepositoryException
- if the search manager could not be created
-
doDispose
protected void doDispose()
Does the actual disposal. assumes holding write lock.
-
externalUpdate
public void externalUpdate(ChangeLog external, List<EventState> events, long timestamp, String userData) throws RepositoryException
Handle an external update.- Specified by:
externalUpdate
in interfaceUpdateEventListener
- Parameters:
external
- external changes containing only node and property ids.events
- events to delivertimestamp
- when the change occurred.userData
- the user data associated with this update.- Throws:
RepositoryException
- if the update cannot be processed
-
-