public class WaitingContinuation extends Object implements Continuation
| Constructor and Description |
|---|
WaitingContinuation() |
WaitingContinuation(Object mutex) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getMutex() |
Object |
getObject()
Arbitrary object associated with the continuation for context.
|
boolean |
isNew()
Is this a newly created Continuation.
|
boolean |
isPending()
Get the pending status?
A continuation is pending while the handling of a call to suspend has not completed.
|
boolean |
isResumed()
Get the resumed status?
|
void |
reset()
Reset the continuation.
|
void |
resume()
Resume the request.
|
void |
setMutex(Object mutex) |
void |
setObject(Object object)
Arbitrary object associated with the continuation for context.
|
boolean |
suspend(long timeout)
Suspend handling.
|
String |
toString() |
public WaitingContinuation()
public WaitingContinuation(Object mutex)
public void resume()
Continuationresume in interface Continuationpublic void reset()
Continuationreset in interface Continuationpublic boolean isNew()
Continuation
A newly created continuation has not had #getEvent(long) called on it.
isNew in interface Continuationpublic boolean suspend(long timeout)
Continuationsuspend in interface Continuationpublic boolean isPending()
ContinuationContinuation.suspend(long).
For non-blocking continuations, pending is true until a second call to Continuation.suspend(long),
thus this method can be used to determine if a request is being retried.isPending in interface Continuationpublic boolean isResumed()
ContinuationisResumed in interface Continuationpublic Object getObject()
ContinuationgetObject in interface Continuationpublic void setObject(Object object)
ContinuationsetObject in interface Continuationobject - An arbitrary object to associate with the continuationpublic Object getMutex()
public void setMutex(Object mutex)
Copyright © 2009 Mortbay Consulting Pty. Ltd. All Rights Reserved.