org.springframework.data.redis.connection
Class FutureResult<T>

java.lang.Object
  extended by 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


Field Summary
protected  Converter converter
           
protected  T resultHolder
           
protected  boolean status
           
 
Constructor Summary
FutureResult(T resultHolder)
           
FutureResult(T resultHolder, Converter converter)
           
 
Method Summary
 Object convert(Object result)
          Converts the given result if a converter is specified, else returns the result
abstract  Object get()
           
 Converter getConverter()
           
 T getResultHolder()
           
 boolean isStatus()
          Indicates if this result is the status of an operation.
 void setStatus(boolean status)
          Indicates if this result is the status of an operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resultHolder

protected T resultHolder

status

protected boolean status

converter

protected Converter converter
Constructor Detail

FutureResult

public FutureResult(T resultHolder)

FutureResult

public FutureResult(T resultHolder,
                    Converter converter)
Method Detail

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