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,
ConnectionManager connectionManager) |
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.
|
Collection<MapperClientInfo> |
getClientInfos()
Get info about current VCS server clients
|
int |
getClosedSessionsCount() |
Session |
getConnection()
Gets a new connection, with no credentials.
|
Session |
getConnection(ConnectionSpec connectionSpec)
Gets a new connection.
|
ManagedConnectionFactoryImpl |
getManagedConnectionFactory() |
ResourceAdapterMetaData |
getMetaData() |
String |
getName()
Gets the repository name.
|
SecurityManager |
getNuxeoSecurityManager() |
Session[] |
getOpenedSessions() |
RecordFactory |
getRecordFactory() |
Reference |
getReference() |
String |
getServerURL()
Which is the remote location ?
TODO this info would be better served by a provisioning service.
|
Session |
getSession(long sessionId)
Deprecated.
unused
|
Session |
getSession(Map<String,Serializable> context) |
int |
getStartedSessionsCount() |
SchemaManager |
getTypeManager() |
void |
initialize() |
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) |
void |
shutdown() |
boolean |
supportsTags() |
public ConnectionFactoryImpl(ManagedConnectionFactoryImpl managedConnectionFactory, ConnectionManager connectionManager)
public ManagedConnectionFactoryImpl getManagedConnectionFactory()
public Session getConnection() throws StorageException
getConnection
in interface ConnectionFactory
StorageException
public Session getConnection(ConnectionSpec connectionSpec) throws StorageException
getConnection
in interface ConnectionFactory
connectionSpec
- the connection spec, containing credentialsStorageException
public ResourceAdapterMetaData getMetaData() throws ResourceException
getMetaData
in interface ConnectionFactory
ResourceException
public RecordFactory getRecordFactory() throws ResourceException
getRecordFactory
in interface ConnectionFactory
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(Map<String,Serializable> context) throws DocumentException
getSession
in interface Repository
DocumentException
@Deprecated public Session getSession(long sessionId) throws DocumentException
getSession
in interface Repository
DocumentException
public SecurityManager getNuxeoSecurityManager()
getNuxeoSecurityManager
in interface Repository
public SchemaManager getTypeManager()
getTypeManager
in interface Repository
public void initialize()
initialize
in interface Repository
public Session[] getOpenedSessions()
getOpenedSessions
in interface Repository
public void shutdown()
shutdown
in interface Repository
public int getStartedSessionsCount()
getStartedSessionsCount
in interface Repository
public int getClosedSessionsCount()
getClosedSessionsCount
in interface Repository
public int getActiveSessionsCount()
RepositoryManagement
getActiveSessionsCount
in interface Repository
getActiveSessionsCount
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 boolean supportsTags()
supportsTags
in interface Repository
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 boolean isServerActivated()
RepositoryManagement
isServerActivated
in interface RepositoryManagement
public String getServerURL()
RepositoryManagement
getServerURL
in interface RepositoryManagement
Copyright © 2011 Nuxeo SA. All Rights Reserved.