|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.batch.poller.DirectPoller<S>
S - the type of the resultpublic class DirectPoller<S>
A Poller that uses the callers thread to poll for a result as soon as
it is asked for. This is often appropriate if you expect a result relatively
quickly, or if there is only one such result expected (otherwise it is more
efficient to use a background thread to do the polling).
| Constructor Summary | |
|---|---|
DirectPoller(long interval)
|
|
| Method Summary | |
|---|---|
java.util.concurrent.Future<S> |
poll(java.util.concurrent.Callable<S> callable)
Get a future for a non-null result from the callback. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DirectPoller(long interval)
| Method Detail |
|---|
public java.util.concurrent.Future<S> poll(java.util.concurrent.Callable<S> callable)
throws java.lang.Exception
Future.get() or
Future.get(long, TimeUnit) will the polling actually start.
poll in interface Poller<S>callable - a Callable to use to retrieve a result
java.lang.ExceptionPoller.poll(Callable)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||