public class CachableRegistration<T> extends java.lang.Object implements Registration<T>
| Constructor and Description |
|---|
CachableRegistration(Selector selector,
T object,
java.lang.Runnable onCancel) |
| Modifier and Type | Method and Description |
|---|---|
Registration<T> |
cancel()
Cancel this Registration by removing it from its registry.
|
Registration<T> |
cancelAfterUse()
Cancel this
Registration after it has been selected and used. |
T |
getObject()
The object that was registered
|
Selector |
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<T> |
pause()
Pause this Registration.
|
Registration<T> |
resume()
Unpause this Registration, making it available for
selection. |
java.lang.String |
toString() |
public Selector getSelector()
RegistrationSelector that was used when the registration was made.getSelector in interface Registration<T>public T getObject()
RegistrationgetObject in interface Registration<T>public Registration<T> cancelAfterUse()
RegistrationRegistration after it has been selected and used. Dispatcher implementations should respect this value and perform
the cancellation.cancelAfterUse in interface Registration<T>public boolean isCancelAfterUse()
RegistrationRegistration after use or not.isCancelAfterUse in interface Registration<T>public Registration<T> cancel()
Registrationcancel in interface Registration<T>cancel in interface reactor.fn.Pausablepublic boolean isCancelled()
RegistrationisCancelled in interface Registration<T>public Registration<T> pause()
Registrationselection.pause in interface Registration<T>pause in interface reactor.fn.Pausablepublic boolean isPaused()
RegistrationisPaused in interface Registration<T>public Registration<T> resume()
Registrationselection.resume in interface Registration<T>resume in interface reactor.fn.Pausablepublic java.lang.String toString()
toString in class java.lang.Object