public interface DestinationSelector
Modifier and Type | Method and Description |
---|---|
default 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
|
default int |
next(int source,
java.lang.Object key,
java.lang.Object data)
Get next destination using source, key and data
|
default void |
prepare(Communicator comm,
java.util.Set<java.lang.Integer> sources,
java.util.Set<java.lang.Integer> destinations)
Prepare the destination selector
|
default void |
prepare(Communicator comm,
java.util.Set<java.lang.Integer> sources,
java.util.Set<java.lang.Integer> destinations,
MessageType keyType,
MessageType dataType)
Prepare the destination selector, if this method is not overridden to support keyType
and dataType those values will be simply discarded.
|
default void prepare(Communicator comm, java.util.Set<java.lang.Integer> sources, java.util.Set<java.lang.Integer> destinations)
comm
- the communicatorsources
- sourcesdestinations
- destinationdefault void prepare(Communicator comm, java.util.Set<java.lang.Integer> sources, java.util.Set<java.lang.Integer> destinations, MessageType keyType, MessageType dataType)
comm
- the communicatorsources
- sourcesdestinations
- destinationkeyType
- type of key that this selector handlesdataType
- type of data that this selector handlesint next(int source, java.lang.Object data)
source
- sourcedata
- datadefault int next(int source, java.lang.Object key, java.lang.Object data)
source
- sourcekey
- keydata
- datadefault void commit(int source, int obtained)
source
- sourceobtained
- obtained destination