|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface RequestStore<ResultType>
Generic interface for tracking background requests and storing their results.
The store object is responsible for cleaning up its own state over time.
| Method Summary | |
|---|---|
long |
add()
Allocate a unique identifier for a subsequent response. |
ResultType |
get(long id)
Get the result of a request. |
void |
put(long id,
ResultType result)
Save the result of a completed request. |
boolean |
waitForCompletion(long id)
Wait for the result to be available for a previously submitted request. |
boolean |
waitForCompletion(long id,
long timeout)
Wait for the result to be available for a previously submitted request, but wait no more the timeout milliseconds. |
| Method Detail |
|---|
long add()
boolean waitForCompletion(long id)
boolean waitForCompletion(long id,
long timeout)
void put(long id,
ResultType result)
ResultType get(long id)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||