D
- either java.sql.Driver or javax.sql.DataSourcepublic interface Balancer<D>
Modifier and Type | Method and Description |
---|---|
boolean |
add(Database<D> database)
Adds the specified database to this balancer.
|
void |
afterInvocation(Database<D> database)
Called after an operation is performed on the specified database retrieved via
next() . |
java.util.Set<Database<D>> |
all()
Returns an unmodifiable collection of databases known to this balancer
|
void |
beforeInvocation(Database<D> database)
Called before an operation is performed on the specified database retrieved via
next() . |
void |
clear()
Removes all databases from this balancer.
|
Database<D> |
next()
Returns the next database from this balancer
|
boolean |
remove(Database<D> database)
Removes the specified database from this balancer.
|
boolean remove(Database<D> database)
database
- a database descriptorboolean add(Database<D> database)
database
- a database descriptorDatabase<D> next()
java.util.Set<Database<D>> all()
void beforeInvocation(Database<D> database)
next()
.database
- a database descriptorvoid afterInvocation(Database<D> database)
next()
.database
- a database descriptorvoid clear()