me.prettyprint.cassandra.service
Class Operation<T>
java.lang.Object
me.prettyprint.cassandra.service.Operation<T>
- Type Parameters:
T
- The result type of the operation (if it has a result), such as the
result of get_count or get_column
Oh closures, how I wish you were here...
- Direct Known Subclasses:
- VirtualKeyspaceOperation
public abstract class Operation<T>
- extends Object
Defines an operation performed on cassandra
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
failCounter
public final CassandraClientMonitor.Counter failCounter
- Counts failed attempts
stopWatchTagName
public final String stopWatchTagName
- The stopwatch used to measure operation performance
failoverPolicy
public FailoverPolicy failoverPolicy
consistencyLevelPolicy
public ConsistencyLevelPolicy consistencyLevelPolicy
keyspaceName
public String keyspaceName
credentials
public Map<String,String> credentials
result
protected T result
execTime
protected long execTime
operationType
public final OperationType operationType
Operation
public Operation(OperationType operationType)
Operation
public Operation(OperationType operationType,
Map<String,String> credentials)
Operation
public Operation(OperationType operationType,
FailoverPolicy failoverPolicy,
String keyspaceName,
Map<String,String> credentials)
applyConnectionParams
public void applyConnectionParams(String keyspace,
ConsistencyLevelPolicy consistencyLevelPolicy,
FailoverPolicy failoverPolicy,
Map<String,String> credentials)
setResult
public void setResult(T executionResult)
getResult
public T getResult()
- Returns:
- The result of the operation, if this is an operation that has a
result (such as getColumn etc.
getExecutionResult
public ExecutionResult<T> getExecutionResult()
execute
public abstract T execute(org.apache.cassandra.thrift.Cassandra.Client cassandra)
throws HectorException
- Performs the operation on the given cassandra instance.
- Throws:
HectorException
executeAndSetResult
public void executeAndSetResult(org.apache.cassandra.thrift.Cassandra.Client cassandra,
CassandraHost cassandraHost)
throws HectorException
- Throws:
HectorException
setException
public void setException(HectorException e)
hasException
public boolean hasException()
getException
public HectorException getException()
getCassandraHost
public CassandraHost getCassandraHost()
Copyright © 2011. All Rights Reserved.