Z - public abstract class AbstractDatabase<Z> extends Object implements Database<Z>
ID_MAX_SIZE| Constructor and Description |
|---|
AbstractDatabase() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertInactive() |
protected void |
checkDirty(Object oldValue,
Object newValue)
Set the dirty flag if the new value differs from the old value.
|
void |
clean() |
int |
compareTo(Database<Z> database) |
String |
decodePassword(Decoder decoder) |
boolean |
equals(Object object) |
String |
getId()
Returns the unique idenfier for this database
|
String |
getLocation()
Returns the location of this database
|
String |
getPassword() |
Map<String,String> |
getProperties() |
String |
getUser() |
int |
getWeight()
Returns the relative "weight" of this cluster node.
|
int |
hashCode() |
boolean |
isActive() |
boolean |
isDirty() |
boolean |
isLocal()
Indicates whether or not this database is local to the machine on which the JVM resides.
|
void |
removeProperty(String name) |
protected boolean |
requiresAuthentication()
Helper method to determine whether the connect() method requires authentication.
|
void |
setActive(boolean active) |
void |
setId(String id) |
void |
setLocal(boolean local) |
void |
setLocation(String name) |
void |
setPassword(String password) |
void |
setProperty(String name,
String value) |
void |
setUser(String user) |
void |
setWeight(int weight) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitconnect, getConnectionSourcepublic AbstractDatabase()
@ManagedAttribute @Description(value="Uniquely identifies this database in the cluster") public String getId()
getId in interface Database<Z>Database.getId()@ManagedAttribute @Description(value="Identifies the location of this database") public String getLocation()
getLocation in interface Database<Z>Database.getLocation()@ManagedAttribute public void setLocation(String name)
@ManagedAttribute @Description(value="User ID for administrative connection authentication") public String getUser()
@ManagedAttribute public void setUser(String user)
@ManagedAttribute @Description(value="Password for administrative connection authentication") public String getPassword()
@ManagedAttribute public void setPassword(String password)
public String decodePassword(Decoder decoder) throws SQLException
decodePassword in interface Database<Z>SQLExceptionDatabase.decodePassword(net.sf.hajdbc.codec.Decoder)@ManagedAttribute @Description(value="Weight used in read request balancing") public int getWeight()
getWeight in interface Database<Z>Database.getWeight()@ManagedAttribute public void setWeight(int weight)
public int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object object)
equals in class ObjectObject.equals(java.lang.Object)public String toString()
toString in class ObjectObject.toString()public int compareTo(Database<Z> database)
compareTo in interface Comparable<Database<Z>>Comparable.compareTo(Object)@ManagedAttribute @Description(value="Connection properties") public Map<String,String> getProperties()
@ManagedOperation @Description(value="Removes the specified connection property") public void removeProperty(String name)
@ManagedOperation @Description(value="Creates/updates the specified connection property") public void setProperty(String name, String value)
@ManagedAttribute public void setLocal(boolean local)
@ManagedAttribute @Description(value="Indicates whether this database is local to this JVM") public boolean isLocal()
isLocal in interface Database<Z>Database.isLocal()public void clean()
clean in interface Database<Z>Database.clean()public boolean isDirty()
isDirty in interface Database<Z>Database.isDirty()@ManagedAttribute @Description(value="Indicates whether or not this database is active") public boolean isActive()
isActive in interface Database<Z>Database.isActive()public void setActive(boolean active)
setActive in interface Database<Z>Database.setActive(boolean)protected void checkDirty(Object oldValue, Object newValue)
oldValue - newValue - protected boolean requiresAuthentication()
protected void assertInactive()
Copyright © 2004–2014 Paul Ferraro. All rights reserved.