org.springframework.data.redis.connection
Class FutureResult<T>
java.lang.Object
org.springframework.data.redis.connection.FutureResult<T>
- Type Parameters:
T
- The data type of the object that holds the future result (usually of type Future)
public abstract class FutureResult<T>
- extends Object
The result of an asynchronous operation
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
resultHolder
protected T resultHolder
status
protected boolean status
converter
protected Converter converter
FutureResult
public FutureResult(T resultHolder)
FutureResult
public FutureResult(T resultHolder,
Converter converter)
getResultHolder
public T getResultHolder()
convert
public Object convert(Object result)
- Converts the given result if a converter is specified, else returns the result
- Parameters:
result
- The result to convert
- Returns:
- The converted result
getConverter
public Converter getConverter()
isStatus
public boolean isStatus()
- Indicates if this result is the status of an operation. Typically status results will be discarded on conversion.
- Returns:
- true if this is a status result (i.e. OK)
setStatus
public void setStatus(boolean status)
- Indicates if this result is the status of an operation. Typically status results will be discarded on conversion.
get
public abstract Object get()
- Returns:
- The result of the operation