com.netflix.astyanax.connectionpool
Interface Operation<CL,R>

Type Parameters:
C -
R -
All Known Implementing Classes:
AbstractKeyspaceOperationImpl, AbstractOperationImpl

public interface Operation<CL,R>

Callback interface to perform an operation on a client associated with a connection pool's connection resource

Author:
elandau

Method Summary
 R execute(CL client)
          Execute the operation on the client object and return the results
 String getKeyspace()
          Return keyspace for this operation.
 Host getPinnedHost()
          Return the host to run on or null to select a host using the load blancer.
 BigInteger getToken()
          Return the unique key on which the operation is performed or null if the operation is performed on multiple keys.
 

Method Detail

execute

R execute(CL client)
          throws ConnectionException
Execute the operation on the client object and return the results

Parameters:
client -
Returns:
Throws:
OperationException
NetflixCassandraException
ConnectionException

getToken

BigInteger getToken()
Return the unique key on which the operation is performed or null if the operation is performed on multiple keys.

Returns:

getKeyspace

String getKeyspace()
Return keyspace for this operation. Return null if using the current keyspace, or a keyspace is not needed for the operation.

Returns:

getPinnedHost

Host getPinnedHost()
Return the host to run on or null to select a host using the load blancer. Failover is disabled for this scenario.

Parameters:
host -
Returns:


Copyright © 2012. All Rights Reserved.