public class RepositoryImpl extends Object implements Repository
Repository
implementation, to be extended by backend-specific
initialization code.RepositoryBackend
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
RepositoryImpl.SessionPathResolver |
Modifier and Type | Field and Description |
---|---|
String |
repositoryId
Transient id for this repository assigned by the server on first
connection.
|
static String |
RUNTIME_SERVER_HOST |
static String |
SERVER_PATH_BINARY |
static String |
SERVER_PATH_VCS |
Lock |
updateReadAclsLock
Lock for calling updateReadAcls.
|
Constructor and Description |
---|
RepositoryImpl(RepositoryDescriptor repositoryDescriptor) |
Modifier and Type | Method and Description |
---|---|
void |
activateServer()
Activates the VCS server used for remote connections.
|
int |
cleanupDeletedDocuments(int max,
Calendar beforeTime)
Cleans up (hard-deletes) any documents that have been soft-deleted in the
database.
|
int |
clearCaches()
Clears all the caches.
|
void |
close()
Closes the repository and release all resources.
|
void |
deactivateServer()
Deactivates the VCS server used for remote connections.
|
int |
getActiveSessionsCount()
Gets the number of active sessions.
|
BinaryGarbageCollector |
getBinaryGarbageCollector()
Gets the binary GC for this repository.
|
BinaryManager |
getBinaryManager() |
long |
getCacheMapperSize() |
long |
getCachePristineSize()
Evaluate number of elements in hier cache
|
long |
getCacheSelectionSize()
Evaluate number of elements in selection cache
|
long |
getCacheSize()
Evaluate number of elements in all caches
|
Collection<MapperClientInfo> |
getClientInfos()
Get info about current VCS server clients
|
SessionImpl |
getConnection()
Gets a new connection by logging in to the repository with default
credentials.
|
SessionImpl |
getConnection(ConnectionSpec connectionSpec)
Gets a new connection by logging in to the repository with given
connection information (credentials).
|
Class<? extends FulltextParser> |
getFulltextParserClass() |
HttpClient |
getHttpClient() |
LockManager |
getLockManager() |
ResourceAdapterMetaData |
getMetaData() |
Model |
getModel() |
String |
getName()
Gets the repository name.
|
RecordFactory |
getRecordFactory() |
Reference |
getReference() |
RepositoryDescriptor |
getRepositoryDescriptor() |
String |
getServerURL()
Which is the remote location ?
TODO this info would be better served by a provisioning service.
|
boolean |
isServerActivated()
Is the server available remotely ?
|
void |
markReferencedBinaries(BinaryGarbageCollector gc)
Marks the binaries actually in use with the GC so that they won't be
deleted.
|
void |
processClusterInvalidationsNext()
Makes sure that the next transaction will process cluster invalidations.
|
void |
setReference(Reference reference) |
public static final String RUNTIME_SERVER_HOST
public static final String SERVER_PATH_VCS
public static final String SERVER_PATH_BINARY
public final Lock updateReadAclsLock
public String repositoryId
public RepositoryImpl(RepositoryDescriptor repositoryDescriptor) throws StorageException
StorageException
public HttpClient getHttpClient()
public boolean isServerActivated()
RepositoryManagement
isServerActivated
in interface RepositoryManagement
public String getServerURL()
RepositoryManagement
getServerURL
in interface RepositoryManagement
public void activateServer()
RepositoryManagement
activateServer
in interface RepositoryManagement
public void deactivateServer()
RepositoryManagement
deactivateServer
in interface RepositoryManagement
public Collection<MapperClientInfo> getClientInfos()
RepositoryManagement
getClientInfos
in interface RepositoryManagement
public RepositoryDescriptor getRepositoryDescriptor()
public BinaryManager getBinaryManager()
public LockManager getLockManager()
public Model getModel()
public Class<? extends FulltextParser> getFulltextParserClass()
public SessionImpl getConnection() throws StorageException
getConnection
in interface ConnectionFactory
getConnection
in interface Repository
StorageException
public SessionImpl getConnection(ConnectionSpec connectionSpec) throws StorageException
getConnection
in interface ConnectionFactory
getConnection
in interface Repository
connectionSpec
- the parameters to use to connnectStorageException
public ResourceAdapterMetaData getMetaData()
getMetaData
in interface ConnectionFactory
public RecordFactory getRecordFactory()
getRecordFactory
in interface ConnectionFactory
public void setReference(Reference reference)
public Reference getReference()
getReference
in interface Referenceable
public void close() throws StorageException
Repository
close
in interface Repository
StorageException
public String getName()
RepositoryManagement
getName
in interface RepositoryManagement
public int getActiveSessionsCount()
RepositoryManagement
getActiveSessionsCount
in interface RepositoryManagement
public int clearCaches()
RepositoryManagement
clearCaches
in interface RepositoryManagement
public long getCacheSize()
RepositoryManagement
getCacheSize
in interface RepositoryManagement
public long getCacheMapperSize()
public long getCachePristineSize()
RepositoryManagement
getCachePristineSize
in interface RepositoryManagement
public long getCacheSelectionSize()
RepositoryManagement
getCacheSelectionSize
in interface RepositoryManagement
public void processClusterInvalidationsNext()
RepositoryManagement
processClusterInvalidationsNext
in interface RepositoryManagement
public BinaryGarbageCollector getBinaryGarbageCollector()
RepositoryManagement
getBinaryGarbageCollector
in interface RepositoryManagement
public void markReferencedBinaries(BinaryGarbageCollector gc)
RepositoryManagement
The passed GC may or may not be the one returned by
RepositoryManagement.getBinaryGarbageCollector()
in case it's been determined that
another repository's GC is pointing to the same binary data.
markReferencedBinaries
in interface RepositoryManagement
gc
- the binary garbage collector to use for this repository's
binariespublic int cleanupDeletedDocuments(int max, Calendar beforeTime)
RepositoryManagement
cleanupDeletedDocuments
in interface RepositoryManagement
max
- the maximum number of documents to delete at a timebeforeTime
- the maximum deletion time of the documents to deleteCopyright © 2013 Nuxeo SA. All Rights Reserved.