public class RepositoryContext extends Object
Modifier and Type | Method and Description |
---|---|
static RepositoryContext |
create(RepositoryConfig config)
Starts a repository with the given configuration and returns
the internal component context of the started repository.
|
ClusterNode |
getClusterNode()
Returns the cluster node instance of this repository, or
null if clustering is not enabled. |
DataStore |
getDataStore()
Returns the data store of this repository, or
null
if a data store is not configured. |
ScheduledExecutorService |
getExecutor()
Returns the thread pool of this repository.
|
FileSystem |
getFileSystem()
Returns the repository file system.
|
InternalVersionManagerImpl |
getInternalVersionManager()
Returns the internal version manager of this repository.
|
ItemStateCacheFactory |
getItemStateCacheFactory()
Returns the item state cache factory of this repository.
|
NamespaceRegistryImpl |
getNamespaceRegistry()
Returns the namespace registry of this repository.
|
NodeIdFactory |
getNodeIdFactory() |
NodeTypeRegistry |
getNodeTypeRegistry()
Returns the namespace registry of this repository.
|
PrivilegeRegistry |
getPrivilegeRegistry()
Returns the privilege registry of this repository.
|
RepositoryImpl |
getRepository()
Returns the repository instance to which this context is associated.
|
RepositoryConfig |
getRepositoryConfig() |
RepositoryStatisticsImpl |
getRepositoryStatistics()
Returns the repository statistics collector.
|
NodeId |
getRootNodeId()
Returns the root node identifier of this repository.
|
JackrabbitSecurityManager |
getSecurityManager()
Returns the security manager of this repository.
|
StatManager |
getStatManager() |
RepositoryImpl.WorkspaceInfo |
getWorkspaceInfo(String workspaceName)
Returns the
RepositoryImpl.WorkspaceInfo for the named workspace. |
WorkspaceManager |
getWorkspaceManager()
Returns the workspace manager of this repository.
|
static RepositoryContext |
install(File dir)
Starts a repository in the given directory and returns the
internal component context of the started repository.
|
boolean |
isGcRunning() |
void |
setGcRunning(boolean gcRunning)
set gcRunnign status
|
void |
setNodeIdFactory(NodeIdFactory nodeIdFactory) |
public static RepositoryContext create(RepositoryConfig config) throws RepositoryException
config
- repository configurationRepositoryException
- if the repository could not be startedpublic static RepositoryContext install(File dir) throws RepositoryException, IOException
dir
- repository directoryRepositoryException
- if the repository could not be startedIOException
- if the directory could not be initializedRepositoryConfig.install(File)
public RepositoryConfig getRepositoryConfig()
public RepositoryImpl getRepository()
public ScheduledExecutorService getExecutor()
public NamespaceRegistryImpl getNamespaceRegistry()
public NodeTypeRegistry getNodeTypeRegistry()
public PrivilegeRegistry getPrivilegeRegistry()
public InternalVersionManagerImpl getInternalVersionManager()
public NodeId getRootNodeId()
public FileSystem getFileSystem()
public DataStore getDataStore()
null
if a data store is not configured.null
public ClusterNode getClusterNode()
null
if clustering is not enabled.public WorkspaceManager getWorkspaceManager()
public RepositoryImpl.WorkspaceInfo getWorkspaceInfo(String workspaceName) throws NoSuchWorkspaceException, RepositoryException
RepositoryImpl.WorkspaceInfo
for the named workspace.workspaceName
- The name of the workspace whose RepositoryImpl.WorkspaceInfo
is to be returned. This must not be null
.RepositoryImpl.WorkspaceInfo
for the named workspace. This will
never be null
.NoSuchWorkspaceException
- If the named workspace does not exist.RepositoryException
- If this repository has been shut down.public JackrabbitSecurityManager getSecurityManager()
public ItemStateCacheFactory getItemStateCacheFactory()
public void setNodeIdFactory(NodeIdFactory nodeIdFactory)
public NodeIdFactory getNodeIdFactory()
public RepositoryStatisticsImpl getRepositoryStatistics()
public StatManager getStatManager()
public boolean isGcRunning()
public void setGcRunning(boolean gcRunning)
gcRunning
- Copyright © 2004–2022 The Apache Software Foundation. All rights reserved.