public interface EndpointPromise extends Promise<Endpoint>
Promise.setSuccess(Object)
method is used when the lookup operation is successful and returns an
Endpoint
. The inherited Promise.setFailure(Exception)
method is used when the lookup operation fails and the client should
transition into stopped state. The setWait(long)
method is used to indicate that the client should wait for a period of
time before making more endpoint lookup requestsModifier and Type | Method and Description |
---|---|
void |
setWait(long delay)
Completes the promise and indicates to the client that it should
wait for a period of time before querying the endpoint service again.
|
isComplete, setFailure, setSuccess
void setWait(long delay) throws IllegalStateException
delay
- a wait time in milliseconds.IllegalStateException
- if this method is invoked when the promise
has already been completed.Copyright © 2015 International Business Machines Corporation. All rights reserved.