K - the type of objects that can be matchedV - the type of objects that can be registeredpublic interface Registry<K,V> extends java.lang.Iterable<Registration<K,? extends V>>
Selectors to map their objects.| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the
Registry, resetting its state and calling Registration.cancel() for any active Registration. |
Registration<K,V> |
register(Selector<K> sel,
V obj)
Assign the given
Selector with the given object. |
java.util.List<Registration<K,? extends V>> |
select(K key)
|
boolean |
unregister(K key)
Remove any objects matching this
key. |
Registration<K,V> register(Selector<K> sel, V obj)
Selector with the given object.sel - The left-hand side of the Selector comparison check.obj - The object to assign.boolean unregister(K key)
key. This will unregister all objects matching the given
key. There's no provision for removing only a specific object.key - The key to be matched by the Selectorsjava.util.List<Registration<K,? extends V>> select(K key)
key - The key for the Selectors to matchList of Registrations whose Selector matches the given key.void clear()
Registry, resetting its state and calling Registration.cancel() for any active Registration.