public class CachableRegistration<K,V> extends Object implements Registration<K,V>
Constructor and Description |
---|
CachableRegistration(Selector<K> selector,
V object,
Runnable onCancel) |
Modifier and Type | Method and Description |
---|---|
Registration<K,V> |
cancel()
Cancel this Registration by removing it from its registry.
|
Registration<K,V> |
cancelAfterUse()
Cancel this
Registration after it has been selected and used. |
V |
getObject()
The object that was registered
|
Selector<K> |
getSelector()
The
Selector that was used when the registration was made. |
boolean |
isCancelAfterUse()
Whether to cancel this
Registration after use or not. |
boolean |
isCancelled()
Has this been cancelled?
|
boolean |
isPaused()
Whether this Registration has been paused or not.
|
Registration<K,V> |
pause()
Pause this Registration.
|
Registration<K,V> |
resume()
Unpause this Registration, making it available for
selection . |
String |
toString() |
public Selector<K> getSelector()
Registration
Selector
that was used when the registration was made.getSelector
in interface Registration<K,V>
public V getObject()
Registration
getObject
in interface Registration<K,V>
public Registration<K,V> cancelAfterUse()
Registration
Registration
after it has been selected and used. Dispatcher
implementations should respect this value and perform
the cancellation.cancelAfterUse
in interface Registration<K,V>
public boolean isCancelAfterUse()
Registration
Registration
after use or not.isCancelAfterUse
in interface Registration<K,V>
public Registration<K,V> cancel()
Registration
public boolean isCancelled()
Registration
isCancelled
in interface Registration<K,V>
public Registration<K,V> pause()
Registration
selection
.public boolean isPaused()
Registration
isPaused
in interface Registration<K,V>
public Registration<K,V> resume()
Registration
selection
.Copyright © 2017. All rights reserved.