private class DefaultExecutorService.DistributedTaskPart<V>
extends java.lang.Object
implements java.util.concurrent.RunnableFuture<V>
Modifier and Type | Field and Description |
---|---|
private boolean |
cancelled |
private org.infinispan.commands.read.DistributedExecuteCommand<V> |
distCommand |
private boolean |
done |
private org.infinispan.remoting.transport.Address |
executionTarget |
private java.util.concurrent.Future<V> |
f |
private int |
failedOverCount |
private java.util.List<java.lang.Object> |
inputKeys |
private java.util.concurrent.locks.ReadWriteLock |
listenerLock |
private java.util.Set< |
listeners |
private DistributedTask<V> |
owningTask |
Constructor and Description |
---|
DefaultExecutorService.DistributedTaskPart(DistributedTask<V> task,
org.infinispan.commands.read.DistributedExecuteCommand<V> command,
java.util.List<java.lang.Object> inputKeys,
org.infinispan.remoting.transport.Address executionTarget,
int failoverCount)
Create a new DistributedTaskPart.
|
Modifier and Type | Method and Description |
---|---|
|
attachListener( |
boolean |
cancel(boolean mayInterruptIfRunning) |
private long |
computeTimeoutNanos(long timeout,
java.util.concurrent.TimeUnit unit) |
boolean |
equals(java.lang.Object obj) |
void |
execute() |
private V |
failoverExecution(java.lang.Exception cause,
long timeout,
java.util.concurrent.TimeUnit unit) |
V |
get() |
V |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
org.infinispan.commands.read.DistributedExecuteCommand<V> |
getCommand() |
org.infinispan.remoting.transport.Address |
getExecutionTarget() |
java.util.List<java.lang.Object> |
getInputKeys() |
private DefaultExecutorService |
getOuterType() |
DistributedTask<V> |
getOwningTask() |
int |
hashCode() |
private V |
innerGet(long timeout,
java.util.concurrent.TimeUnit unit) |
protected void |
invokeLocally() |
boolean |
isCancelled() |
boolean |
isDone() |
boolean |
isLocalNodeExecutionTarget() |
void |
notifyDone() |
(package private) V |
retrieveResult(java.lang.Object response) |
void |
run() |
void |
setNetworkFuture(java.util.concurrent.Future<V> future) |
protected java.util.concurrent.ExecutionException |
wrapIntoExecutionException(java.lang.Exception e) |
private final org.infinispan.commands.read.DistributedExecuteCommand<V> distCommand
private volatile java.util.concurrent.Future<V> f
private final java.util.Set<> listeners
private final java.util.concurrent.locks.ReadWriteLock listenerLock
private final org.infinispan.remoting.transport.Address executionTarget
private final java.util.List<java.lang.Object> inputKeys
private final DistributedTask<V> owningTask
private int failedOverCount
private volatile boolean done
private volatile boolean cancelled
public DefaultExecutorService.DistributedTaskPart(DistributedTask<V> task, org.infinispan.commands.read.DistributedExecuteCommand<V> command, java.util.List<java.lang.Object> inputKeys, org.infinispan.remoting.transport.Address executionTarget, int failoverCount)
task
- command
- executionTarget
- failoverCount
- public java.util.List<java.lang.Object> getInputKeys()
public org.infinispan.commands.read.DistributedExecuteCommand<V> getCommand()
public DistributedTask<V> getOwningTask()
public org.infinispan.remoting.transport.Address getExecutionTarget()
public boolean isCancelled()
isCancelled
in interface java.util.concurrent.Future<V>
public boolean isDone()
isDone
in interface java.util.concurrent.Future<V>
public boolean isLocalNodeExecutionTarget()
public boolean cancel(boolean mayInterruptIfRunning)
cancel
in interface java.util.concurrent.Future<V>
public V get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
get
in interface java.util.concurrent.Future<V>
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public V get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
get
in interface java.util.concurrent.Future<V>
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
private V innerGet(long timeout, java.util.concurrent.TimeUnit unit) throws java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException, java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
java.lang.InterruptedException
private long computeTimeoutNanos(long timeout, java.util.concurrent.TimeUnit unit)
protected java.util.concurrent.ExecutionException wrapIntoExecutionException(java.lang.Exception e)
private V failoverExecution(java.lang.Exception cause, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.Exception
java.lang.Exception
public void notifyDone()
publicattachListener( listener)
public void setNetworkFuture(java.util.concurrent.Future<V> future)
V retrieveResult(java.lang.Object response) throws java.lang.Exception
java.lang.Exception
public void execute()
protected void invokeLocally()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public void run()
run
in interface java.lang.Runnable
run
in interface java.util.concurrent.RunnableFuture<V>
private DefaultExecutorService getOuterType()