org.opennms.netmgt.config.opennmsDataSources
Class ConnectionPool

java.lang.Object
  extended by org.opennms.netmgt.config.opennmsDataSources.ConnectionPool
All Implemented Interfaces:
Serializable

public class ConnectionPool
extends Object
implements Serializable

Database connection pool configuration.

Version:
$Revision$ $Date$
See Also:
Serialized Form

Constructor Summary
ConnectionPool()
           
 
Method Summary
 void deleteIdleTimeout()
           
 void deleteLoginTimeout()
           
 void deleteMaxPool()
           
 void deleteMaxSize()
           
 void deleteMinPool()
           
 boolean equals(Object obj)
          Overrides the java.lang.Object.equals method.
 String getFactory()
          Returns the value of field 'factory'.
 int getIdleTimeout()
          Returns the value of field 'idleTimeout'.
 int getLoginTimeout()
          Returns the value of field 'loginTimeout'.
 int getMaxPool()
          Returns the value of field 'maxPool'.
 int getMaxSize()
          Returns the value of field 'maxSize'.
 int getMinPool()
          Returns the value of field 'minPool'.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean hasIdleTimeout()
          Method hasIdleTimeout.
 boolean hasLoginTimeout()
          Method hasLoginTimeout.
 boolean hasMaxPool()
          Method hasMaxPool.
 boolean hasMaxSize()
          Method hasMaxSize.
 boolean hasMinPool()
          Method hasMinPool.
 boolean isValid()
          Method isValid.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void setFactory(String factory)
          Sets the value of field 'factory'.
 void setIdleTimeout(int idleTimeout)
          Sets the value of field 'idleTimeout'.
 void setLoginTimeout(int loginTimeout)
          Sets the value of field 'loginTimeout'.
 void setMaxPool(int maxPool)
          Sets the value of field 'maxPool'.
 void setMaxSize(int maxSize)
          Sets the value of field 'maxSize'.
 void setMinPool(int minPool)
          Sets the value of field 'minPool'.
static ConnectionPool unmarshal(Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionPool

public ConnectionPool()
Method Detail

deleteIdleTimeout

public void deleteIdleTimeout()

deleteLoginTimeout

public void deleteLoginTimeout()

deleteMaxPool

public void deleteMaxPool()

deleteMaxSize

public void deleteMaxSize()

deleteMinPool

public void deleteMinPool()

equals

public boolean equals(Object obj)
Overrides the java.lang.Object.equals method.

Overrides:
equals in class Object
Parameters:
obj -
Returns:
true if the objects are equal.

getFactory

public String getFactory()
Returns the value of field 'factory'. The field 'factory' has the following description: The connection pool implementation to use.

Returns:
the value of field 'Factory'.

getIdleTimeout

public int getIdleTimeout()
Returns the value of field 'idleTimeout'. The field 'idleTimeout' has the following description: How long, in seconds, an idle connection is kept in the pool before it is removed.

Returns:
the value of field 'IdleTimeout'.

getLoginTimeout

public int getLoginTimeout()
Returns the value of field 'loginTimeout'. The field 'loginTimeout' has the following description: How long, in seconds, to attempt to make a connection to the database.

Returns:
the value of field 'LoginTimeout'.

getMaxPool

public int getMaxPool()
Returns the value of field 'maxPool'. The field 'maxPool' has the following description: The maximum number of pooled connections to retain.

Returns:
the value of field 'MaxPool'.

getMaxSize

public int getMaxSize()
Returns the value of field 'maxSize'. The field 'maxSize' has the following description: The maximum number of connections that can be created.

Returns:
the value of field 'MaxSize'.

getMinPool

public int getMinPool()
Returns the value of field 'minPool'. The field 'minPool' has the following description: The minimum number of pooled connections to retain.

Returns:
the value of field 'MinPool'.

hasIdleTimeout

public boolean hasIdleTimeout()
Method hasIdleTimeout.

Returns:
true if at least one IdleTimeout has been added

hasLoginTimeout

public boolean hasLoginTimeout()
Method hasLoginTimeout.

Returns:
true if at least one LoginTimeout has been added

hasMaxPool

public boolean hasMaxPool()
Method hasMaxPool.

Returns:
true if at least one MaxPool has been added

hasMaxSize

public boolean hasMaxSize()
Method hasMaxSize.

Returns:
true if at least one MaxSize has been added

hasMinPool

public boolean hasMinPool()
Method hasMinPool.

Returns:
true if at least one MinPool has been added

hashCode

public int hashCode()
Overrides the java.lang.Object.hashCode method.

The following steps came from Effective Java Programming Language Guide by Joshua Bloch, Chapter 3

Overrides:
hashCode in class Object
Returns:
a hash code value for the object.

isValid

public boolean isValid()
Method isValid.

Returns:
true if this object is valid according to the schema

marshal

public void marshal(Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

marshal

public void marshal(ContentHandler handler)
             throws IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
handler -
Throws:
IOException - if an IOException occurs during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling

setFactory

public void setFactory(String factory)
Sets the value of field 'factory'. The field 'factory' has the following description: The connection pool implementation to use.

Parameters:
factory - the value of field 'factory'.

setIdleTimeout

public void setIdleTimeout(int idleTimeout)
Sets the value of field 'idleTimeout'. The field 'idleTimeout' has the following description: How long, in seconds, an idle connection is kept in the pool before it is removed.

Parameters:
idleTimeout - the value of field 'idleTimeout'.

setLoginTimeout

public void setLoginTimeout(int loginTimeout)
Sets the value of field 'loginTimeout'. The field 'loginTimeout' has the following description: How long, in seconds, to attempt to make a connection to the database.

Parameters:
loginTimeout - the value of field 'loginTimeout'.

setMaxPool

public void setMaxPool(int maxPool)
Sets the value of field 'maxPool'. The field 'maxPool' has the following description: The maximum number of pooled connections to retain.

Parameters:
maxPool - the value of field 'maxPool'.

setMaxSize

public void setMaxSize(int maxSize)
Sets the value of field 'maxSize'. The field 'maxSize' has the following description: The maximum number of connections that can be created.

Parameters:
maxSize - the value of field 'maxSize'.

setMinPool

public void setMinPool(int minPool)
Sets the value of field 'minPool'. The field 'minPool' has the following description: The minimum number of pooled connections to retain.

Parameters:
minPool - the value of field 'minPool'.

unmarshal

public static ConnectionPool unmarshal(Reader reader)
                                throws org.exolab.castor.xml.MarshalException,
                                       org.exolab.castor.xml.ValidationException
Method unmarshal.

Parameters:
reader -
Returns:
the unmarshaled org.opennms.netmgt.config.opennmsDataSources.ConnectionPool
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Throws:
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema


Copyright © 2011. All Rights Reserved.