Class WhileHandler
- java.lang.Object
-
- uk.gov.gchq.gaffer.store.operation.handler.WhileHandler
-
- All Implemented Interfaces:
OperationHandler<While<Object,Object>>
,OutputOperationHandler<While<Object,Object>,Object>
- Direct Known Subclasses:
FederatedWhileHandler
public class WhileHandler extends Object implements OutputOperationHandler<While<Object,Object>,Object>
An operation handler for
The default handler has a maxRepeats field that can be overridden by system administrators. The default value is set to 1000. To update this value, create an operation declarations JSON file containing the While operation and your configured WhileHandler. E.g:While
operations.{ "operations": [ { "operation": "uk.gov.gchq.gaffer.operation.impl.While", "handler": { "class": "uk.gov.gchq.gaffer.store.operation.handler.WhileHandler", "maxRepeats": 10 } } ] }
and then register a path to the json file in your store properties using the key gaffer.store.operation.declarations.
-
-
Constructor Summary
Constructors Constructor Description WhileHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
doDelegateOperation(Object input, Operation delegate, Context context, Store store)
Object
doOperation(While operation, Context context, Store store)
Execute the givenOutput
operation.int
getMaxRepeats()
boolean
isSatisfied(Object input, While operation, Context context, Store store)
void
setMaxRepeats(int maxRepeats)
void
validateMaxRepeats(While operation)
-
-
-
Method Detail
-
doOperation
public Object doOperation(While operation, Context context, Store store) throws OperationException
Description copied from interface:OutputOperationHandler
Execute the givenOutput
operation.- Specified by:
doOperation
in interfaceOperationHandler<While<Object,Object>>
- Specified by:
doOperation
in interfaceOutputOperationHandler<While<Object,Object>,Object>
- Parameters:
operation
- theOutput
operation to be executedcontext
- the operation chain context, containing the user who executed the operationstore
- theStore
the operation should be run on- Returns:
- the output for the operation.
- Throws:
OperationException
- thrown if the operation fails
-
validateMaxRepeats
public void validateMaxRepeats(While operation) throws OperationException
- Throws:
OperationException
-
doDelegateOperation
public Object doDelegateOperation(Object input, Operation delegate, Context context, Store store) throws OperationException
- Throws:
OperationException
-
isSatisfied
public boolean isSatisfied(Object input, While operation, Context context, Store store) throws OperationException
- Throws:
OperationException
-
getMaxRepeats
public int getMaxRepeats()
-
setMaxRepeats
public void setMaxRepeats(int maxRepeats)
-
-