Class 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-session WorkspaceImpl instances representing the same named workspace, i.e. the same physical storage.
    • Constructor Detail

      • WorkspaceInfo

        protected 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.
      • 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
      • 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
      • 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
      • 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 occurred.
        userData - the user data associated with this update.
        Throws:
        RepositoryException - if the update cannot be processed