|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.impl.fostore.FOStoreConnectionFactory
public class FOStoreConnectionFactory
A connection factory for FOStore. Allows both same- and remote-address space connections. For the same address space-connections, the URL must not include the Host (Server) parameter. For remote address space connections, the URL's protocol is ignored.
This class is public
so that clients can create instances of it
with new
.
Field Summary | |
---|---|
protected static java.util.HashMap |
CFpropsAccessors
This table maps from names to CFAccessors. |
Constructor Summary | |
---|---|
FOStoreConnectionFactory()
First time a FOStoreConnectionFactory is created, initialize accessors which are used to store/save instances via JNDI. |
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static java.util.HashMap CFpropsAccessors
Constructor Detail |
---|
public FOStoreConnectionFactory()
Method Detail |
---|
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |