public class RegisterFuture<V> extends TaskFuture<V>
Constructor and Description |
---|
RegisterFuture(ISession session)
Constructs a register future associated with a session.
|
Modifier and Type | Method and Description |
---|---|
IFuture<V> |
await()
Waits for this future to be completed.
|
IFuture<V> |
await(long timeoutMillis)
Waits for this future to be completed within the specified time limit.
|
IFuture<V> |
await(long timeout,
TimeUnit unit)
Waits for this future to be completed within the specified time limit.
|
IFuture<V> |
awaitUninterruptibly()
Waits for this future to be completed without interruption.
|
IFuture<V> |
awaitUninterruptibly(long timeoutMillis)
Waits for this future to be completed within the specified time limit
without interruption.
|
IFuture<V> |
awaitUninterruptibly(long timeout,
TimeUnit unit)
Waits for this future to be completed within the specified time limit
without interruption.
|
boolean |
cancel(boolean arg0) |
Throwable |
cause()
Returns the cause of the failed I/O operation.
|
V |
get() |
V |
get(long timeout,
TimeUnit unit) |
protected org.snf4j.core.future.FutureLock |
getLock() |
IFuture<V> |
sync()
Waits for this future to be completed, and throws an exception that wraps
the cause of the failure if this future failed.
|
IFuture<V> |
sync(long timeoutMillis)
Waits for this future to be completed within the specified time limit,
and throws an exception that wraps the cause of the failure if this
future failed.
|
IFuture<V> |
sync(long timeout,
TimeUnit unit)
Waits for this future to be completed within the specified time limit,
and throws an exception that wraps the cause of the failure if this
future failed.
|
IFuture<V> |
syncUninterruptibly()
Waits for this future to be completed without interruption, and throws an
exception that wraps the cause of the failure if this future failed.
|
IFuture<V> |
syncUninterruptibly(long timeoutMillis)
Waits for this future to be completed within the specified time limit
without interruption, and throws an exception that wraps the cause of the
failure if this future failed.
|
IFuture<V> |
syncUninterruptibly(long timeout,
TimeUnit unit)
Waits for this future to be completed within the specified time limit
without interruption, and throws an exception that wraps the cause of the
failure if this future failed.
|
abort, success
getNow, getSession, isCancelled, isDone, isFailed, isSuccessful, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, cause, getNow, getSession, isFailed, isSuccessful, sync, sync, sync, syncUninterruptibly, syncUninterruptibly, syncUninterruptibly
public RegisterFuture(ISession session)
session
- the session this future is associated with, or
null
if this future is not associated with any
sessionprotected org.snf4j.core.future.FutureLock getLock()
public IFuture<V> await() throws InterruptedException
IFuture
InterruptedException
- if the current thread was interrupted.public IFuture<V> await(long timeoutMillis) throws InterruptedException
IFuture
timeoutMillis
- the time limit in milliseconds to waitInterruptedException
- if the current thread was interrupted.public IFuture<V> await(long timeout, TimeUnit unit) throws InterruptedException
IFuture
timeout
- the time limit to waitunit
- the time unit of the time limitInterruptedException
- if the current thread was interrupted.public IFuture<V> awaitUninterruptibly()
IFuture
public IFuture<V> awaitUninterruptibly(long timeoutMillis)
IFuture
timeoutMillis
- the time limit in milliseconds to waitpublic IFuture<V> awaitUninterruptibly(long timeout, TimeUnit unit)
IFuture
timeout
- the time limit to waitunit
- the time unit of the time limitpublic IFuture<V> sync() throws InterruptedException, ExecutionException
IFuture
InterruptedException
- if the current thread was interrupted.ExecutionException
- if this future failedpublic IFuture<V> sync(long timeoutMillis) throws InterruptedException, ExecutionException, TimeoutException
IFuture
timeoutMillis
- the time limit in milliseconds to waitInterruptedException
- if the current thread was interrupted.ExecutionException
- if this future failedTimeoutException
- if the time limit expired without completion of this futurepublic IFuture<V> sync(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
IFuture
timeout
- the time limit to waitunit
- the time unit of the time limitInterruptedException
- if the current thread was interrupted.ExecutionException
- if this future failedTimeoutException
- if the time limit expired without completion of this futurepublic IFuture<V> syncUninterruptibly() throws ExecutionException
IFuture
ExecutionException
- if this future failedpublic IFuture<V> syncUninterruptibly(long timeoutMillis) throws ExecutionException, TimeoutException
IFuture
timeoutMillis
- the time limit in milliseconds to waitExecutionException
- if this future failedTimeoutException
- if the time limit expired without completion of this futurepublic IFuture<V> syncUninterruptibly(long timeout, TimeUnit unit) throws ExecutionException, TimeoutException
IFuture
timeout
- the time limit to waitunit
- the time unit of the time limitExecutionException
- if this future failedTimeoutException
- if the time limit expired without completion of this futurepublic V get() throws InterruptedException, ExecutionException
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
public boolean cancel(boolean arg0)
Copyright © 2017–2021 SNF4J.ORG. All rights reserved.