Z
- D
- public abstract class AbstractBalancer<Z,D extends Database<Z>> extends Object implements Balancer<Z,D>
Balancer.next()
.
Uses A copy-on-write algorithm for Set.add(Object)
, Set.remove(Object)
, and Set.clear()
.
Calls to iterator()
are non-blocking.Constructor and Description |
---|
AbstractBalancer() |
Modifier and Type | Method and Description |
---|---|
Iterable<D> |
backups()
The non-primary databases.
|
boolean |
contains(Object database) |
boolean |
containsAll(Collection<?> databases) |
boolean |
equals(Object object) |
protected abstract Set<D> |
getDatabases() |
int |
hashCode() |
boolean |
isEmpty() |
Iterator<D> |
iterator() |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
String |
toString() |
public AbstractBalancer()
protected abstract Set<D> getDatabases()
public boolean containsAll(Collection<?> databases)
containsAll
in interface Collection<D extends Database<Z>>
containsAll
in interface Set<D extends Database<Z>>
Set.containsAll(java.util.Collection)
public boolean isEmpty()
public int size()
public <T> T[] toArray(T[] array)
public int hashCode()
Copyright © 2004–2014 Paul Ferraro. All rights reserved.