public class ByteSelector extends java.lang.Object implements DestinationSelector
Modifier and Type | Field and Description |
---|---|
protected int[] |
destinationsList |
protected int |
keysToOneTask |
Constructor and Description |
---|
ByteSelector() |
Modifier and Type | Method and Description |
---|---|
void |
commit(int source,
int obtained)
Say that we have used the obtained destination
|
int |
next(int source,
java.lang.Object data)
Get next destination using source and the data
|
int |
next(int source,
java.lang.Object key,
java.lang.Object data)
Get next destination using source, key and data
|
void |
prepare(Communicator comm,
java.util.Set<java.lang.Integer> sources,
java.util.Set<java.lang.Integer> destinations)
Prepare the destination selector
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
prepare
protected int keysToOneTask
protected int[] destinationsList
public void prepare(Communicator comm, java.util.Set<java.lang.Integer> sources, java.util.Set<java.lang.Integer> destinations)
DestinationSelector
prepare
in interface DestinationSelector
comm
- the communicatorsources
- sourcesdestinations
- destinationpublic int next(int source, java.lang.Object data)
DestinationSelector
next
in interface DestinationSelector
source
- sourcedata
- datapublic int next(int source, java.lang.Object key, java.lang.Object data)
DestinationSelector
next
in interface DestinationSelector
source
- sourcekey
- keydata
- datapublic void commit(int source, int obtained)
DestinationSelector
commit
in interface DestinationSelector
source
- sourceobtained
- obtained destination