com.netflix.astyanax.connectionpool.impl
Class OperationResultImpl<R>

java.lang.Object
  extended by com.netflix.astyanax.connectionpool.impl.OperationResultImpl<R>
All Implemented Interfaces:
OperationResult<R>

public class OperationResultImpl<R>
extends Object
implements OperationResult<R>


Constructor Summary
OperationResultImpl(Host host, R result, long latency)
           
 
Method Summary
 int getAttemptsCount()
          Return the number of times the operation had to be retried.
 Host getHost()
          Get the host on which the operation was performed
 long getLatency()
          Return the length of time to perform the operation.
 long getLatency(TimeUnit units)
          Return the length of time to perform the operation.
 R getResult()
          Get the result data
 void setAttemptsCount(int count)
          Set the number of attempts executing this connection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationResultImpl

public OperationResultImpl(Host host,
                           R result,
                           long latency)
Method Detail

getHost

public Host getHost()
Description copied from interface: OperationResult
Get the host on which the operation was performed

Specified by:
getHost in interface OperationResult<R>
Returns:

getResult

public R getResult()
Description copied from interface: OperationResult
Get the result data

Specified by:
getResult in interface OperationResult<R>
Returns:

getLatency

public long getLatency()
Description copied from interface: OperationResult
Return the length of time to perform the operation. Does not include connection pool overhead. This time is in nanoseconds

Specified by:
getLatency in interface OperationResult<R>
Returns:

getLatency

public long getLatency(TimeUnit units)
Description copied from interface: OperationResult
Return the length of time to perform the operation. Does not include connection pool overhead.

Specified by:
getLatency in interface OperationResult<R>
Returns:

getAttemptsCount

public int getAttemptsCount()
Description copied from interface: OperationResult
Return the number of times the operation had to be retried. This includes retries for aborted connections.

Specified by:
getAttemptsCount in interface OperationResult<R>
Returns:

setAttemptsCount

public void setAttemptsCount(int count)
Description copied from interface: OperationResult
Set the number of attempts executing this connection

Specified by:
setAttemptsCount in interface OperationResult<R>


Copyright © 2012. All Rights Reserved.