public class ManagedConnectionFactoryImpl extends Object implements ManagedConnectionFactory, ResourceAdapterAssociation, RepositoryManagement
ManagedConnection
(the physical connection).
It also is a factory for ConnectionFactory
s.
Constructor and Description |
---|
ManagedConnectionFactoryImpl() |
ManagedConnectionFactoryImpl(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.
|
Object |
createConnectionFactory() |
Object |
createConnectionFactory(ConnectionManager connectionManager) |
ManagedConnection |
createManagedConnection(Subject subject,
ConnectionRequestInfo connectionRequestInfo) |
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
|
PrintWriter |
getLogWriter() |
String |
getName()
Gets the repository name.
|
String |
getProperty() |
ResourceAdapter |
getResourceAdapter() |
String |
getXaDataSource() |
void |
markReferencedBinaries(BinaryGarbageCollector gc)
Marks the binaries actually in use with the GC so that they won't be
deleted.
|
ManagedConnection |
matchManagedConnections(Set set,
Subject subject,
ConnectionRequestInfo cri)
Returns a matched connection from the candidate set of connections.
|
static Map<String,String> |
parseProperties(String expr)
Parses a string of the form:
key1=val1;key2=val2;... and
collects the key/value pairs. |
void |
processClusterInvalidationsNext()
Makes sure that the next transaction will process cluster invalidations.
|
void |
setLogWriter(PrintWriter out) |
void |
setName(String name) |
void |
setProperty(String property)
Properties are specified in the format key=val1[;key2=val2;...]
|
void |
setResourceAdapter(ResourceAdapter resourceAdapter)
Called by the application server exactly once to associate this
ManagedConnectionFactory with a ResourceAdapter.
|
void |
setXaDataSource(String xaDataSourceName) |
void |
shutdown() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode
public ManagedConnectionFactoryImpl()
public ManagedConnectionFactoryImpl(RepositoryDescriptor repositoryDescriptor)
public void setName(String name)
public String getName()
RepositoryManagement
getName
in interface RepositoryManagement
public void setXaDataSource(String xaDataSourceName)
public String getXaDataSource()
public void setProperty(String property)
If a value has to contain a semicolon, it can be escaped by doubling it.
property
- parseProperties(String)
public String getProperty()
public void setResourceAdapter(ResourceAdapter resourceAdapter) throws ResourceException
setResourceAdapter
in interface ResourceAdapterAssociation
ResourceException
public ResourceAdapter getResourceAdapter()
getResourceAdapter
in interface ResourceAdapterAssociation
public void setLogWriter(PrintWriter out)
setLogWriter
in interface ManagedConnectionFactory
public PrintWriter getLogWriter()
getLogWriter
in interface ManagedConnectionFactory
public Object createConnectionFactory() throws ResourceException
createConnectionFactory
in interface ManagedConnectionFactory
ResourceException
public Object createConnectionFactory(ConnectionManager connectionManager) throws ResourceException
createConnectionFactory
in interface ManagedConnectionFactory
ResourceException
public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo connectionRequestInfo) throws ResourceException
createManagedConnection
in interface ManagedConnectionFactory
ResourceException
public ManagedConnection matchManagedConnections(Set set, Subject subject, ConnectionRequestInfo cri) throws ResourceException
Called by the application server when it's looking for an appropriate connection to server from a pool.
matchManagedConnections
in interface ManagedConnectionFactory
ResourceException
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 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 deletepublic void shutdown()
public static Map<String,String> parseProperties(String expr)
key1=val1;key2=val2;...
and
collects the key/value pairs.
A ';' character may end the expression. If a value has to contain a ';', it can be escaped by doubling it.
Examples of valid expressions: key1=val1
,
key1=val1;
, key1=val1;key2=val2
,
key1=a=b;;c=d;key2=val2
.
Syntax errors are reported using the logger and will stop the parsing but already collected properties will be available. The ';' or '=' characters cannot be escaped in keys.
expr
- the expression to parseCopyright © 2013 Nuxeo SA. All Rights Reserved.