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
WorkspaceInfoholds the objects that are shared among multiple per-sessionWorkspaceImplinstances representing the same named workspace, i.e. the same physical storage.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedWorkspaceInfo(WorkspaceConfig config)Creates a newWorkspaceInfobased on the givenconfig.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected LockManagerImplcreateLockManager()Create a new lock manager.protected voiddoDispose()Does the actual disposal.protected voiddoInitialize()Does the actual initialization work.protected voiddoPostInitialize()Initializes the search manager of this workspace info.protected voiddoVersionRecovery()If necessary, recover from a lost version history.voidexternalUpdate(ChangeLog external, List<EventState> events, long timestamp, String userData)Handle an external update.WorkspaceConfiggetConfig()Returns the workspace configuration.protected FileSystemgetFileSystem()Returns the workspace file system.protected SharedItemStateManagergetItemStateProvider()Returns the workspace item state providerprotected LockManagerImplgetLockManager()Returns the lock manager for this workspace.protected StringgetName()Returns the workspace name.protected ObservationDispatchergetObservationDispatcher()Returns the observation dispatcher for this workspacePersistenceManagergetPersistenceManager()Returns the workspace persistence manager.protected RetentionRegistrygetRetentionRegistry()Return manager used for evaluating effect retention and holds.protected SearchManagergetSearchManager()Returns the search manager for this workspace.protected org.apache.jackrabbit.core.SystemSessiongetSystemSession()Returns the system session for this workspace.booleanisActive()protected booleanisInitialized()Returnstrueif this workspace info is initialized, otherwise returnsfalse.voidsetActive(boolean active)
-
-
-
Constructor Detail
-
WorkspaceInfo
protected WorkspaceInfo(WorkspaceConfig config)
Creates a newWorkspaceInfobased 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()
Returnstrueif this workspace info is initialized, otherwise returnsfalse.- Returns:
trueif 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
nullif 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 RepositoryExceptionReturns 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 RepositoryExceptionDoes the actual initialization work. assumes holding write lock.- Throws:
RepositoryException- if an error occurs.
-
doVersionRecovery
protected void doVersionRecovery() throws RepositoryExceptionIf necessary, recover from a lost version history.- Throws:
RepositoryException
-
doPostInitialize
protected void doPostInitialize() throws RepositoryExceptionInitializes the search manager of this workspace info. This method is called while still holding the write lock on this workspace info, butinitializedis 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:
externalUpdatein 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
-
-