Z
- connection source (e.g. Driver, DataSource, etc.)public interface Database<Z> extends Comparable<Database<Z>>
Modifier and Type | Field and Description |
---|---|
static int |
ID_MAX_SIZE |
Modifier and Type | Method and Description |
---|---|
void |
clean() |
Connection |
connect(Z connectionSource,
String password)
Connects to the database using the specified connection factory.
|
String |
decodePassword(Decoder decoder) |
Z |
getConnectionSource()
Returns a connection source for this database.
|
String |
getId()
Returns the unique idenfier for this database
|
String |
getLocation()
Returns the location of this database
|
int |
getWeight()
Returns the relative "weight" of this cluster node.
|
boolean |
isActive() |
boolean |
isDirty() |
boolean |
isLocal()
Indicates whether or not this database is local to the machine on which the JVM resides.
|
void |
setActive(boolean active) |
compareTo
static final int ID_MAX_SIZE
String getLocation()
int getWeight()
boolean isLocal()
String decodePassword(Decoder decoder) throws SQLException
SQLException
Connection connect(Z connectionSource, String password) throws SQLException
connectionSource
- a factory object for creating connectionspassword
- a decoded passwordSQLException
- if connection failsZ getConnectionSource()
IllegalArgumentException
- if connection source could not be createdboolean isDirty()
void clean()
boolean isActive()
void setActive(boolean active)
Copyright © 2004–2014 Paul Ferraro. All rights reserved.