Package io.ebeaninternal.server.query
Class QueryFutureList<T>
- java.lang.Object
-
- io.ebeaninternal.server.query.QueryFutureList<T>
-
- All Implemented Interfaces:
FutureList<T>
,Future<List<T>>
public class QueryFutureList<T> extends Object implements FutureList<T>
Default implementation for FutureList.
-
-
Constructor Summary
Constructors Constructor Description QueryFutureList(CallableQueryList<T> call)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancel(boolean mayInterruptIfRunning)
T
get()
T
get(long timeout, TimeUnit unit)
FutureTask<List<T>>
getFutureTask()
Query<T>
getQuery()
Return the query that is being executed by a background thread.Transaction
getTransaction()
List<T>
getUnchecked()
Same asFuture.get()
but wraps InterruptedException and ExecutionException in the unchecked PersistenceException.List<T>
getUnchecked(long timeout, TimeUnit unit)
Same asFuture.get(long, java.util.concurrent.TimeUnit)
but wraps InterruptedException and ExecutionException in the unchecked PersistenceException.boolean
isCancelled()
boolean
isDone()
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.concurrent.Future
get, get, isCancelled, isDone
-
-
-
-
Constructor Detail
-
QueryFutureList
public QueryFutureList(CallableQueryList<T> call)
-
-
Method Detail
-
getFutureTask
public FutureTask<List<T>> getFutureTask()
-
getTransaction
public Transaction getTransaction()
-
getQuery
public Query<T> getQuery()
Description copied from interface:FutureList
Return the query that is being executed by a background thread.- Specified by:
getQuery
in interfaceFutureList<T>
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
getUnchecked
public List<T> getUnchecked()
Description copied from interface:FutureList
Same asFuture.get()
but wraps InterruptedException and ExecutionException in the unchecked PersistenceException.- Specified by:
getUnchecked
in interfaceFutureList<T>
- Returns:
- The query list result
-
getUnchecked
public List<T> getUnchecked(long timeout, TimeUnit unit) throws TimeoutException
Description copied from interface:FutureList
Same asFuture.get(long, java.util.concurrent.TimeUnit)
but wraps InterruptedException and ExecutionException in the unchecked PersistenceException.- Specified by:
getUnchecked
in interfaceFutureList<T>
- Returns:
- The query list result
- Throws:
TimeoutException
- if the wait timed out
-
get
public T get() throws InterruptedException, ExecutionException
- Specified by:
get
in interfaceFuture<T>
- Throws:
InterruptedException
ExecutionException
-
get
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
get
in interfaceFuture<T>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfaceFuture<T>
-
-