public class ConnectionFactoryImpl extends Object implements Repository, Repository
ConnectionManager
.
An instance of this class is returned to the application when a JNDI lookup is done. This is the datasource
equivalent of SQLRepository
.
Constructor and Description |
---|
ConnectionFactoryImpl(ManagedConnectionFactoryImpl managedConnectionFactory,
javax.resource.spi.ConnectionManager connectionManager) |
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.
|
BinaryGarbageCollector |
getBinaryGarbageCollector()
Gets the binary GC for this repository.
|
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
|
Session |
getConnection()
Gets a new connection.
|
Session |
getConnection(javax.resource.cci.ConnectionSpec connectionSpec)
Gets a new connection.
|
ManagedConnectionFactoryImpl |
getManagedConnectionFactory() |
javax.resource.cci.ResourceAdapterMetaData |
getMetaData() |
String |
getName()
Gets the repository name.
|
javax.resource.cci.RecordFactory |
getRecordFactory() |
Reference |
getReference() |
Session |
getSession(String sessionId) |
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) |
void |
shutdown() |
public ConnectionFactoryImpl(ManagedConnectionFactoryImpl managedConnectionFactory, javax.resource.spi.ConnectionManager connectionManager)
public ManagedConnectionFactoryImpl getManagedConnectionFactory()
public Session getConnection(javax.resource.cci.ConnectionSpec connectionSpec) throws StorageException
getConnection
in interface javax.resource.cci.ConnectionFactory
connectionSpec
- the connection spec (unused)StorageException
public Session getConnection() throws StorageException
getConnection
in interface javax.resource.cci.ConnectionFactory
StorageException
public javax.resource.cci.ResourceAdapterMetaData getMetaData() throws javax.resource.ResourceException
getMetaData
in interface javax.resource.cci.ConnectionFactory
javax.resource.ResourceException
public javax.resource.cci.RecordFactory getRecordFactory() throws javax.resource.ResourceException
getRecordFactory
in interface javax.resource.cci.ConnectionFactory
javax.resource.ResourceException
public Reference getReference()
getReference
in interface Referenceable
public void setReference(Reference reference)
public void close() throws StorageException
Repository
StorageException
public String getName()
RepositoryManagement
getName
in interface Repository
getName
in interface RepositoryManagement
public Session getSession(String sessionId) throws DocumentException
getSession
in interface Repository
DocumentException
public void shutdown()
shutdown
in interface Repository
public int getActiveSessionsCount()
RepositoryManagement
getActiveSessionsCount
in interface Repository
getActiveSessionsCount
in interface RepositoryManagement
public long getCacheSize()
RepositoryManagement
getCacheSize
in interface RepositoryManagement
public long getCachePristineSize()
RepositoryManagement
getCachePristineSize
in interface RepositoryManagement
public long getCacheSelectionSize()
RepositoryManagement
getCacheSelectionSize
in interface RepositoryManagement
public int clearCaches()
RepositoryManagement
clearCaches
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.