Class AbstractOperationChainOptimiser
- java.lang.Object
-
- uk.gov.gchq.gaffer.store.optimiser.AbstractOperationChainOptimiser
-
- All Implemented Interfaces:
OperationChainOptimiser
- Direct Known Subclasses:
CountAllElementsOperationChainOptimiser
public abstract class AbstractOperationChainOptimiser extends Object implements OperationChainOptimiser
Abstract base class for theOperationChainOptimiser
interface.
-
-
Constructor Summary
Constructors Constructor Description AbstractOperationChainOptimiser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <O> OperationChain<O>
optimise(OperationChain<O> operationChain)
Optimises the operation chain.
-
-
-
Method Detail
-
optimise
public final <O> OperationChain<O> optimise(OperationChain<O> operationChain)
Description copied from interface:OperationChainOptimiser
Optimises the operation chain. Operations in the chain can be swapped for more efficient operations depending on the store implementation. The operation chain has already been cloned so changes may be made directly to the operation chain parameter if required. This method can be extended to add custom optimisation, but ensure super.optimise is called first. Alternatively, the preferred approach is to override addPreOperations, optimiseCurrentOperation or addPostOperations- Specified by:
optimise
in interfaceOperationChainOptimiser
- Type Parameters:
O
- the operation output type- Parameters:
operationChain
- the operation chain to optimise- Returns:
- the optimised operation chain
-
-