public class RepositoryImpl extends Object implements Repository
Repository implementation, to be extended by backend-specific
initialization code.RepositoryBackend,
Serialized Form| Modifier 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 |
| Constructor and Description |
|---|
RepositoryImpl(RepositoryDescriptor repositoryDescriptor) |
| Modifier and Type | Method and Description |
|---|---|
void |
activateServer()
Activates the VCS server used for remote connections.
|
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() |
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).
|
HttpClient |
getHttpClient() |
LockManager |
getLockManager() |
ResourceAdapterMetaData |
getMetaData() |
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 String repositoryId
public RepositoryImpl(RepositoryDescriptor repositoryDescriptor) throws StorageException
StorageExceptionpublic HttpClient getHttpClient()
public boolean isServerActivated()
RepositoryManagementisServerActivated in interface RepositoryManagementpublic String getServerURL()
RepositoryManagementgetServerURL in interface RepositoryManagementpublic void activateServer()
RepositoryManagementactivateServer in interface RepositoryManagementpublic void deactivateServer()
RepositoryManagementdeactivateServer in interface RepositoryManagementpublic Collection<MapperClientInfo> getClientInfos()
RepositoryManagementgetClientInfos in interface RepositoryManagementpublic RepositoryDescriptor getRepositoryDescriptor()
public BinaryManager getBinaryManager()
public LockManager getLockManager()
public SessionImpl getConnection() throws StorageException
getConnection in interface ConnectionFactorygetConnection in interface RepositoryStorageExceptionpublic SessionImpl getConnection(ConnectionSpec connectionSpec) throws StorageException
getConnection in interface ConnectionFactorygetConnection in interface RepositoryconnectionSpec - the parameters to use to connnectStorageExceptionpublic ResourceAdapterMetaData getMetaData()
getMetaData in interface ConnectionFactorypublic RecordFactory getRecordFactory()
getRecordFactory in interface ConnectionFactorypublic void setReference(Reference reference)
public Reference getReference()
getReference in interface Referenceablepublic void close()
throws StorageException
Repositoryclose in interface RepositoryStorageExceptionpublic String getName()
RepositoryManagementgetName in interface RepositoryManagementpublic int getActiveSessionsCount()
RepositoryManagementgetActiveSessionsCount in interface RepositoryManagementpublic int clearCaches()
RepositoryManagementclearCaches in interface RepositoryManagementpublic void processClusterInvalidationsNext()
RepositoryManagementprocessClusterInvalidationsNext in interface RepositoryManagementpublic BinaryGarbageCollector getBinaryGarbageCollector()
RepositoryManagementgetBinaryGarbageCollector in interface RepositoryManagementpublic 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 RepositoryManagementgc - the binary garbage collector to use for this repository's
binariesCopyright © 2011 Nuxeo SA. All Rights Reserved.