net.spy.memcached.internal
Class OperationFuture<T>
java.lang.Object
net.spy.memcached.compat.SpyObject
net.spy.memcached.internal.OperationFuture<T>
- Type Parameters:
T
- Type of object returned from this future.
- All Implemented Interfaces:
- java.util.concurrent.Future<T>
public class OperationFuture<T>
- extends SpyObject
- implements java.util.concurrent.Future<T>
Managed future for operations.
Not intended for general use.
Constructor Summary |
OperationFuture(java.lang.String k,
java.util.concurrent.CountDownLatch l,
java.util.concurrent.atomic.AtomicReference<T> oref,
long opTimeout)
|
OperationFuture(java.lang.String k,
java.util.concurrent.CountDownLatch l,
long opTimeout)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
status
protected OperationStatus status
OperationFuture
public OperationFuture(java.lang.String k,
java.util.concurrent.CountDownLatch l,
long opTimeout)
OperationFuture
public OperationFuture(java.lang.String k,
java.util.concurrent.CountDownLatch l,
java.util.concurrent.atomic.AtomicReference<T> oref,
long opTimeout)
cancel
public boolean cancel(boolean ign)
- Specified by:
cancel
in interface java.util.concurrent.Future<T>
get
public T get()
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
- Specified by:
get
in interface java.util.concurrent.Future<T>
- Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
get
public T get(long duration,
java.util.concurrent.TimeUnit units)
throws java.lang.InterruptedException,
java.util.concurrent.TimeoutException,
java.util.concurrent.ExecutionException
- Specified by:
get
in interface java.util.concurrent.Future<T>
- Throws:
java.lang.InterruptedException
java.util.concurrent.TimeoutException
java.util.concurrent.ExecutionException
getKey
public java.lang.String getKey()
getStatus
public OperationStatus getStatus()
set
public void set(T o,
OperationStatus s)
setOperation
public void setOperation(Operation to)
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interface java.util.concurrent.Future<T>
isDone
public boolean isDone()
- Specified by:
isDone
in interface java.util.concurrent.Future<T>
Copyright © 2006-2009 Dustin Sallings, 2009-2012 Couchbase, Inc.