org.apache.jackrabbit.core
Class RepositoryImpl.WorkspaceInfo

java.lang.Object
  extended by org.apache.jackrabbit.core.RepositoryImpl.WorkspaceInfo
All Implemented Interfaces:
UpdateEventListener
Enclosing class:
RepositoryImpl

protected class RepositoryImpl.WorkspaceInfo
extends Object
implements UpdateEventListener

WorkspaceInfo holds the objects that are shared among multiple per-session WorkspaceImpl instances representing the same named workspace, i.e. the same physical storage.


Constructor Summary
protected RepositoryImpl.WorkspaceInfo(WorkspaceConfig config)
          Creates a new WorkspaceInfo based on the given config.
 
Method Summary
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.
 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 provider
protected  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 workspace
protected  PersistenceManager 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.
protected  boolean isInitialized()
          Returns true if this workspace info is initialized, otherwise returns false.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryImpl.WorkspaceInfo

protected RepositoryImpl.WorkspaceInfo(WorkspaceConfig config)
Creates a new WorkspaceInfo based on the given config.

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()
Returns true if this workspace info is initialized, otherwise returns false.

Returns:
true if this workspace info is initialized.

getFileSystem

protected FileSystem getFileSystem()
Returns the workspace file system.

Returns:
the workspace file system

getPersistenceManager

protected 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 no SearchManager
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

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.

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, but initialized is already set to true.

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 interface UpdateEventListener
Parameters:
external - external changes containing only node and property ids.
events - events to deliver
timestamp - when the change occured.
userData - the user data associated with this update.
Throws:
RepositoryException - if the update cannot be processed


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.