T - The generic type of the outcome for the Future.protected class NonBlockingLockManager.LockFutureTask<T> extends FutureTaskMon<T>
FutureTask which executes once it holds its locks.| Constructor and Description |
|---|
NonBlockingLockManager.LockFutureTask(R[] resource,
Callable<T> task,
long timeout,
int maxLockTries) |
NonBlockingLockManager.LockFutureTask(R[] resources,
Runnable task,
T val,
long timeout,
int maxLockTries) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
Extended signal
NonBlockingLockManager.stateChanged when the
task completes and to track counters. |
long |
getLockLatency()
The elapsed nanoseconds the task waited to acquire its locks.
|
long |
getLockTimeout()
The timeout (milliseconds) or ZERO (0L) for an infinite timeout.
|
int |
getMaxLockTries()
The maximum #of times that the task will attempt to acquire its locks
(positive integer).
|
R[] |
getResource()
The resource(s) that are pre-declared by the task.
|
protected boolean |
isTimeout()
True if the
lockTimeout has expired when measured against
now. |
void |
run()
Extended signal
NonBlockingLockManager.stateChanged when the
task completes and to track counters. |
protected void |
setException(Throwable t)
Extended signal
NonBlockingLockManager.stateChanged when the
task completes, to track counters, and also exposed to the outer
class. |
String |
toString() |
done, get, get, isCancelled, isDone, runAndReset, setpublic NonBlockingLockManager.LockFutureTask(R[] resource, Callable<T> task, long timeout, int maxLockTries)
protected boolean isTimeout()
lockTimeout has expired when measured against
now.public R[] getResource()
#call()
will ensure that the task as a lock on these resources before it
invokes run() to execution the task.public long getLockLatency()
public int getMaxLockTries()
public long getLockTimeout()
protected void setException(Throwable t)
NonBlockingLockManager.stateChanged when the
task completes, to track counters, and also exposed to the outer
class.setException in class FutureTask<T>public boolean cancel(boolean mayInterruptIfRunning)
NonBlockingLockManager.stateChanged when the
task completes and to track counters.public void run()
NonBlockingLockManager.stateChanged when the
task completes and to track counters.run in interface Runnablerun in interface RunnableFuture<T>run in class FutureTaskMon<T>Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.