public class HashingSelector extends java.lang.Object implements DestinationSelector
| Constructor and Description |
|---|
HashingSelector() |
| Modifier and Type | Method and Description |
|---|---|
void |
commit(int source,
int dest)
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> dests)
Prepare the destination selector
|
void |
prepare(Communicator comm,
java.util.Set<java.lang.Integer> sources,
java.util.Set<java.lang.Integer> dests,
MessageType kType,
MessageType dType)
Prepare the destination selector, if this method is not overridden to support keyType
and dataType those values will be simply discarded.
|
public void prepare(Communicator comm, java.util.Set<java.lang.Integer> sources, java.util.Set<java.lang.Integer> dests)
DestinationSelectorprepare in interface DestinationSelectorcomm - the communicatorsources - sourcesdests - destinationpublic void prepare(Communicator comm, java.util.Set<java.lang.Integer> sources, java.util.Set<java.lang.Integer> dests, MessageType kType, MessageType dType)
DestinationSelectorprepare in interface DestinationSelectorcomm - the communicatorsources - sourcesdests - destinationkType - type of key that this selector handlesdType - type of data that this selector handlespublic int next(int source,
java.lang.Object key,
java.lang.Object data)
DestinationSelectornext in interface DestinationSelectorsource - sourcekey - keydata - datapublic int next(int source,
java.lang.Object data)
DestinationSelectornext in interface DestinationSelectorsource - sourcedata - datapublic void commit(int source,
int dest)
DestinationSelectorcommit in interface DestinationSelectorsource - sourcedest - obtained destination