S
- the type of the resultpublic class DirectPoller<S> extends Object implements Poller<S>
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 and Description |
---|
DirectPoller(long interval) |
public Future<S> poll(Callable<S> callable) throws Exception
Future.get()
or
Future.get(long, TimeUnit)
will the polling actually start.Copyright © 2014 Pivotal. All rights reserved.