public class ConnectionFactoryImpl
extends org.datanucleus.store.connection.AbstractConnectionFactory
mongodb:[{server1}][/{dbName}][,{server2}[,{server3}]]Defaults to a server of "localhost" if nothing specified. Defaults to a DB name of "DataNucleus" if nothing specified. Has a DB object per PM/EM. TODO Allow the option of having DB per PMF/EMF.
Modifier and Type | Class and Description |
---|---|
class |
ConnectionFactoryImpl.ManagedConnectionImpl |
Modifier and Type | Field and Description |
---|---|
static String |
MONGODB_CONNECTIONS_PER_HOST |
static String |
MONGODB_THREAD_BLOCK_FOR_MULTIPLIER |
Constructor and Description |
---|
ConnectionFactoryImpl(org.datanucleus.store.StoreManager storeMgr,
String resourceType)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
org.datanucleus.store.connection.ManagedConnection |
createManagedConnection(org.datanucleus.ExecutionContext ec,
Map options)
Obtain a connection from the Factory.
|
public static final String MONGODB_CONNECTIONS_PER_HOST
public static final String MONGODB_THREAD_BLOCK_FOR_MULTIPLIER
public ConnectionFactoryImpl(org.datanucleus.store.StoreManager storeMgr, String resourceType)
storeMgr
- Store ManagerresourceType
- Type of resource (tx, nontx)public void close()
close
in interface org.datanucleus.store.connection.ConnectionFactory
close
in class org.datanucleus.store.connection.AbstractConnectionFactory
public org.datanucleus.store.connection.ManagedConnection createManagedConnection(org.datanucleus.ExecutionContext ec, Map options)
ec
- the pool that is bound the connection during its lifecycle (or null)options
- Options for creating the connectionManagedConnection
Copyright © 2016. All rights reserved.