Package uk.gov.gchq.gaffer.graph.hook
Class NamedViewResolver
- java.lang.Object
-
- uk.gov.gchq.gaffer.graph.hook.NamedViewResolver
-
- All Implemented Interfaces:
GetFromCacheHook,GraphHook
public class NamedViewResolver extends Object implements GetFromCacheHook
-
-
Constructor Summary
Constructors Constructor Description NamedViewResolver(String suffixNamedViewCacheName)NamedViewResolver(NamedViewCache cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetSuffixCacheName()<T> TonFailure(T result, OperationChain<?> opChain, Context context, Exception e)Called fromGraphif an error occurs whilst executing theOperationChain.<T> TpostExecute(T result, OperationChain<?> opChain, Context context)Called fromGraphafter anOperationChainis executed.voidpreExecute(OperationChain<?> opChain, Context context)Called fromGraphbefore anOperationChainis executed.
-
-
-
Constructor Detail
-
NamedViewResolver
public NamedViewResolver(String suffixNamedViewCacheName)
-
NamedViewResolver
public NamedViewResolver(NamedViewCache cache)
-
-
Method Detail
-
getSuffixCacheName
public String getSuffixCacheName()
- Specified by:
getSuffixCacheNamein interfaceGetFromCacheHook
-
preExecute
public void preExecute(OperationChain<?> opChain, Context context)
Description copied from interface:GraphHookCalled fromGraphbefore anOperationChainis executed.- Specified by:
preExecutein interfaceGraphHook- Parameters:
opChain- theOperationChainbeing executed. This can be modified/optimised in any GraphHook.context- theContextin which the operation chain was executed. The context also holds a reference to the original operation chain.
-
postExecute
public <T> T postExecute(T result, OperationChain<?> opChain, Context context)Description copied from interface:GraphHookCalled fromGraphafter anOperationChainis executed.- Specified by:
postExecutein interfaceGraphHook- Type Parameters:
T- the result type- Parameters:
result- the result from the operation chainopChain- theOperationChainthat was executed. This can be modified/optimised in any GraphHook.context- theContextin which the operation chain was executed. The context also holds a reference to the original operation chain.- Returns:
- result object
-
onFailure
public <T> T onFailure(T result, OperationChain<?> opChain, Context context, Exception e)Description copied from interface:GraphHookCalled fromGraphif an error occurs whilst executing theOperationChain.- Specified by:
onFailurein interfaceGraphHook- Type Parameters:
T- the result type- Parameters:
result- the result from the operation chain - likely to be null.opChain- theOperationChainthat was executed. This can be modified/optimised in any GraphHook.context- theContextin which the operation chain was executed. The context also holds a reference to the original operation chain.e- the exception- Returns:
- result object
-
-