public class FOStoreConnectionFactory
extends java.lang.Object
implements java.io.Serializable
This class is public
so that clients can create instances of it
with new
.
Modifier and Type | Field and Description |
---|---|
protected static java.util.HashMap |
CFpropsAccessors
This table maps from names to CFAccessors.
|
Constructor and Description |
---|
FOStoreConnectionFactory()
First time a FOStoreConnectionFactory is created, initialize accessors
which are used to store/save instances via JNDI.
|
Modifier and Type | Method and Description |
---|---|
void |
closeDatabase()
Close the database.
|
org.apache.jdo.impl.fostore.FOStoreClientConnection |
getConnection()
Provides a connection to the database using the configured userName,
password, and url.
|
org.apache.jdo.impl.fostore.FOStoreClientConnection |
getConnection(java.lang.String user,
java.lang.String password)
Provides a connection to the database using the given userName and
password.
|
boolean |
getCreate()
Returns whether to create the database.
|
java.lang.String |
getDriverName()
Provides name of driver used for connections
|
int |
getLoginTimeout()
Returns the number of seconds to wait for a new connection to be
established to the data source
|
java.io.PrintWriter |
getLogWriter()
Returns the LogWriter to which messages should be sent
|
int |
getMaxPool()
Returns maximum number of connections in the connection pool
|
int |
getMinPool()
Returns minimum number of connections in the connection pool
|
int |
getMsInterval()
Returns the amount of time, in milliseconds, between the connection
manager's attempts to get a pooled connection.
|
int |
getMsWait()
Returns the number of milliseconds to wait for an available connection
from the connection pool before throwing an exception
|
FOStorePMF |
getPMF()
Provides PersistenceManagerFactory for connections
|
java.lang.String |
getURL()
Returns connection URL
|
java.lang.String |
getUserName()
Returns database user name
|
protected static void |
initPropsAccessors() |
boolean |
isConfigured()
Returns true if this connection factory has been configured with a URL.
|
void |
setCreate(boolean create)
Sets whether to create the database.
|
void |
setCreate(java.lang.String create)
Sets whether to create the database.
|
void |
setDriverName(java.lang.String driverName)
Sets name of the driver for connections
|
void |
setFromProperties(java.util.Properties p)
Configures a FOStoreConnectionFactory from the given Properties.
|
void |
setLoginTimeout(int loginTimeout)
Sets the number of seconds to wait for a new connection to be
established to the data source
|
void |
setLogWriter(java.io.PrintWriter logWriter)
Sets the LogWriter to which messages should be sent
|
void |
setMaxPool(int maxPool)
Sets maximum number of connections in the connection pool
|
void |
setMinPool(int minPool)
Sets minimum number of connections in the connection pool
|
void |
setMsInterval(int msInterval)
Sets the amount of time, in milliseconds, between the connection
manager's attempts to get a pooled connection.
|
void |
setMsWait(int msWait)
Sets the number of milliseconds to wait for an available connection
from the connection pool before throwing an exception
|
void |
setPassword(java.lang.String password)
Sets database user password
|
void |
setPMF(FOStorePMF pmf)
Sets PersistenceManagerFactory for connections
|
void |
setURL(java.lang.String url)
Sets connection URL
|
void |
setUserName(java.lang.String userName)
Sets database user
|
java.lang.String |
toString() |
protected static java.util.HashMap CFpropsAccessors
public FOStoreConnectionFactory()
public org.apache.jdo.impl.fostore.FOStoreClientConnection getConnection(java.lang.String user, java.lang.String password)
public org.apache.jdo.impl.fostore.FOStoreClientConnection getConnection()
public void closeDatabase()
public void setDriverName(java.lang.String driverName)
driverName
- driver namepublic FOStorePMF getPMF()
public void setPMF(FOStorePMF pmf)
pmf
- PersistenceManagerFactorypublic java.lang.String getDriverName()
public void setURL(java.lang.String url)
url
- connection URLpublic java.lang.String getURL()
public void setUserName(java.lang.String userName)
userName
- database userpublic java.lang.String getUserName()
public void setPassword(java.lang.String password)
password
- database user passwordpublic void setMinPool(int minPool)
minPool
- minimum number of connectionspublic int getMinPool()
public void setMaxPool(int maxPool)
maxPool
- maximum number of connectionspublic int getMaxPool()
public void setMsInterval(int msInterval)
msInterval
- the interval between attempts to get a database
connection, in milliseconds.public int getMsInterval()
public void setMsWait(int msWait)
msWait
- number in millisecondspublic int getMsWait()
public void setLogWriter(java.io.PrintWriter logWriter)
logWriter
- logWriterpublic java.io.PrintWriter getLogWriter()
public void setLoginTimeout(int loginTimeout)
loginTimeout
- wait time in secondspublic int getLoginTimeout()
public void setCreate(boolean create)
create
- whether to create the database.public void setCreate(java.lang.String create)
create
- whether to create the database.public boolean getCreate()
protected static void initPropsAccessors()
public void setFromProperties(java.util.Properties p)
public boolean isConfigured()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.