D
- either java.sql.Driver or javax.sql.DataSourcepublic class SimpleBalancer<Z,D extends Database<Z>> extends AbstractSetBalancer<Z,D>
next()
implementation always returns the database with the highest weight.Constructor and Description |
---|
SimpleBalancer(Set<D> databases)
Constructs a new SimpleBalancer
|
Modifier and Type | Method and Description |
---|---|
protected void |
added(D database)
Called when a database was added to the set.
|
protected void |
cleared()
Called when the set was cleared.
|
D |
next()
Returns the next database from this balancer
|
protected void |
removed(D database)
Called when a database was removed from the set.
|
add, addAll, clear, getDatabases, getLock, invoke, primary, remove, removeAll, retainAll
public SimpleBalancer(Set<D> databases)
databases
- public D next()
Balancer.next()
protected void added(D database)
added
in class AbstractSetBalancer<Z,D extends Database<Z>>
database
- a database descriptorAbstractSetBalancer.added(net.sf.hajdbc.Database)
protected void removed(D database)
removed
in class AbstractSetBalancer<Z,D extends Database<Z>>
database
- a database descriptorAbstractSetBalancer.removed(net.sf.hajdbc.Database)
protected void cleared()
cleared
in class AbstractSetBalancer<Z,D extends Database<Z>>
AbstractSetBalancer.cleared()
Copyright © 2004–2014 Paul Ferraro. All rights reserved.