// hook into lifecycle
DistributedTaskLifecycleService taskLifecycleService = DistributedTaskLifecycleService.getInstance();
Callable<V> callable = getCallable();
V result = null;
try {
taskLifecycleService.onPreExecute(callable, cache);
if (callable instanceof DistributedCallable<?, ?, ?>) {
DistributedCallable<Object, Object, Object> dc = (DistributedCallable<Object, Object, Object>) callable;
dc.setEnvironment(cache, keys);
}
result = callable.call();