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.
|
Constructor and Description |
---|
RepositoryImpl(RepositoryDescriptor repositoryDescriptor) |
Modifier and Type | Method and Description |
---|---|
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.
|
int |
getActiveSessionsCount()
Gets the number of active sessions.
|
RepositoryBackend |
getBackend() |
BinaryGarbageCollector |
getBinaryGarbageCollector()
Gets the binary GC for this repository.
|
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
|
SessionImpl |
getConnection()
Gets a new connection.
|
SessionImpl |
getConnection(javax.resource.cci.ConnectionSpec connectionSpec)
Gets a new connection.
|
Class<? extends FulltextParser> |
getFulltextParserClass() |
LockManager |
getLockManager() |
javax.resource.cci.ResourceAdapterMetaData |
getMetaData() |
Model |
getModel() |
String |
getName()
Gets the repository name.
|
javax.resource.cci.RecordFactory |
getRecordFactory() |
Reference |
getReference() |
RepositoryDescriptor |
getRepositoryDescriptor() |
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 String repositoryId
public RepositoryImpl(RepositoryDescriptor repositoryDescriptor) throws StorageException
StorageException
public RepositoryDescriptor getRepositoryDescriptor()
public LockManager getLockManager()
public Model getModel()
public RepositoryBackend getBackend()
public Class<? extends FulltextParser> getFulltextParserClass()
public SessionImpl getConnection(javax.resource.cci.ConnectionSpec connectionSpec) throws StorageException
getConnection
in interface javax.resource.cci.ConnectionFactory
getConnection
in interface Repository
connectionSpec
- the parameters to use to connect (unused)StorageException
public SessionImpl getConnection() throws StorageException
getConnection
in interface javax.resource.cci.ConnectionFactory
getConnection
in interface Repository
StorageException
public javax.resource.cci.ResourceAdapterMetaData getMetaData()
getMetaData
in interface javax.resource.cci.ConnectionFactory
public javax.resource.cci.RecordFactory getRecordFactory()
getRecordFactory
in interface javax.resource.cci.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 © 2015 Nuxeo SA. All rights reserved.