Package org.apache.activemq.store
Class InlineListenableFuture
- java.lang.Object
-
- org.apache.activemq.store.InlineListenableFuture
-
- All Implemented Interfaces:
Future<Object>,ListenableFuture<Object>
public class InlineListenableFuture extends Object implements ListenableFuture<Object>
-
-
Constructor Summary
Constructors Constructor Description InlineListenableFuture()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(Runnable listener)register a listener to be run on completion or immediately if complete any exceptions will be caught and loggedObjectcall()booleancancel(boolean mayInterruptIfRunning)Objectget()Objectget(long timeout, TimeUnit unit)booleanisCancelled()booleanisDone()
-
-
-
Method Detail
-
addListener
public void addListener(Runnable listener)
Description copied from interface:ListenableFutureregister a listener to be run on completion or immediately if complete any exceptions will be caught and logged- Specified by:
addListenerin interfaceListenableFuture<Object>
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelledin interfaceFuture<Object>
-
get
public Object get() throws InterruptedException, ExecutionException
- Specified by:
getin interfaceFuture<Object>- Throws:
InterruptedExceptionExecutionException
-
get
public Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
getin interfaceFuture<Object>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
-