D - either java.sql.Driver or javax.sql.DataSourcepublic abstract class AbstractDatabase<D> extends java.lang.Object implements Database<D>
| Constructor and Description |
|---|
AbstractDatabase() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkDirty(java.lang.Object oldValue,
java.lang.Object newValue)
Set the dirty flag if the new value differs from the old value.
|
void |
clean() |
int |
compareTo(Database<D> database) |
boolean |
equals(java.lang.Object object) |
java.lang.String |
getId()
Returns the unique idenfier for this database
|
java.lang.String |
getPassword() |
java.util.Properties |
getProperties()
Returns a collection of additional properties of this database.
|
java.lang.String |
getUser() |
int |
getWeight()
Returns the relative "weight" of this cluster node.
|
int |
hashCode() |
boolean |
isDirty() |
boolean |
isLocal()
Indicates whether or not this database is local to the machine on which the JVM resides.
|
void |
removeProperty(java.lang.String name)
Removes the specified property.
|
void |
setId(java.lang.String id) |
void |
setLocal(boolean local)
Sets whether or not this database is local to the machine on which the JVM resides.
|
void |
setPassword(java.lang.String password)
Set the password for this database
|
void |
setProperties(java.util.Properties properties) |
void |
setProperty(java.lang.String name,
java.lang.String value)
Set the value of the specified property.
|
void |
setUser(java.lang.String user)
Set the user for this database.
|
void |
setWeight(int weight)
Set the weight for this database
|
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitconnect, createConnectionFactory, getActiveMBean, getInactiveMBeanpublic AbstractDatabase()
public java.lang.String getId()
ActiveDatabaseMBeangetId in interface ActiveDatabaseMBeanActiveDatabaseMBean.getId()public void setId(java.lang.String id)
id - public java.lang.String getUser()
getUser in interface ActiveDatabaseMBeanActiveDatabaseMBean.getUser()public void setUser(java.lang.String user)
InactiveDatabaseMBeansetUser in interface InactiveDatabaseMBeanuser - a userInactiveDatabaseMBean.setUser(java.lang.String)public java.lang.String getPassword()
getPassword in interface ActiveDatabaseMBeanActiveDatabaseMBean.getPassword()public void setPassword(java.lang.String password)
InactiveDatabaseMBeansetPassword in interface InactiveDatabaseMBeanpassword - a passwordInactiveDatabaseMBean.setPassword(java.lang.String)public int getWeight()
ActiveDatabaseMBeangetWeight in interface ActiveDatabaseMBeanActiveDatabaseMBean.getWeight()public void setWeight(int weight)
InactiveDatabaseMBeansetWeight in interface InactiveDatabaseMBeanweight - a weightInactiveDatabaseMBean.setWeight(int)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean equals(java.lang.Object object)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public java.util.Properties getProperties()
ActiveDatabaseMBeangetProperties in interface ActiveDatabaseMBeanActiveDatabaseMBean.getProperties()public void setProperties(java.util.Properties properties)
properties - public void removeProperty(java.lang.String name)
InactiveDatabaseMBeanremoveProperty in interface InactiveDatabaseMBeanname - a property nameInactiveDatabaseMBean.removeProperty(java.lang.String)public void setProperty(java.lang.String name, java.lang.String value)
InactiveDatabaseMBeansetProperty in interface InactiveDatabaseMBeanname - a property namevalue - a property valueInactiveDatabaseMBean.setProperty(java.lang.String, java.lang.String)public void setLocal(boolean local)
InactiveDatabaseMBeansetLocal in interface InactiveDatabaseMBeanlocal - true if local, false if remoteInactiveDatabaseMBean.setLocal(boolean)public boolean isLocal()
ActiveDatabaseMBeanisLocal in interface ActiveDatabaseMBeanActiveDatabaseMBean.isLocal()public void clean()
clean in interface Database<D>Database.clean()public boolean isDirty()
isDirty in interface Database<D>Database.isDirty()protected void checkDirty(java.lang.Object oldValue, java.lang.Object newValue)
oldValue - newValue -