com.netflix.astyanax.connectionpool.impl
Class AbstractOperationFilter<CL,R>

java.lang.Object
  extended by com.netflix.astyanax.connectionpool.impl.AbstractOperationFilter<CL,R>
Type Parameters:
CL -
R -
All Implemented Interfaces:
Operation<CL,R>

public class AbstractOperationFilter<CL,R>
extends java.lang.Object
implements Operation<CL,R>

Class that wraps an Operation to provide extra functionality. It can be used by extending class to wrap operation executions and then decorate the execute functionality with their own logic


Constructor Summary
AbstractOperationFilter(Operation<CL,R> next)
           
 
Method Summary
 R execute(CL client, ConnectionContext state)
          Execute the operation on the client object and return the results.
 java.lang.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.
 java.nio.ByteBuffer getRowKey()
          Return the unique key on which the operation is performed or null if the operation is performed on multiple keys.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractOperationFilter

public AbstractOperationFilter(Operation<CL,R> next)
Method Detail

execute

public R execute(CL client,
                 ConnectionContext state)
          throws ConnectionException
Description copied from interface: Operation
Execute the operation on the client object and return the results.

Specified by:
execute in interface Operation<CL,R>
Parameters:
client - - The client object
state - - State and metadata specific to the connection
Returns:
Throws:
ConnectionException

getRowKey

public java.nio.ByteBuffer getRowKey()
Description copied from interface: Operation
Return the unique key on which the operation is performed or null if the operation is performed on multiple keys.

Specified by:
getRowKey in interface Operation<CL,R>
Returns:

getKeyspace

public java.lang.String getKeyspace()
Description copied from interface: Operation
Return keyspace for this operation. Return null if using the current keyspace, or a keyspace is not needed for the operation.

Specified by:
getKeyspace in interface Operation<CL,R>
Returns:

getPinnedHost

public Host getPinnedHost()
Description copied from interface: Operation
Return the host to run on or null to select a host using the load blancer. Failover is disabled for this scenario.

Specified by:
getPinnedHost in interface Operation<CL,R>
Returns: