Examples of onPreExecute()


Examples of org.infinispan.distexec.spi.DistributedTaskLifecycleService.onPreExecute()

                  Object result = null;
                  getCommand().init(cache);
                  DistributedTaskLifecycleService lifecycle = DistributedTaskLifecycleService.getInstance();
                  try {
                     // hook into lifecycle
                     lifecycle.onPreExecute(getCommand().getCallable(), cache);
                     cancellationService.register(Thread.currentThread(), getCommand().getUUID());
                     result = getCommand().perform(null);
                     return Collections.singletonMap(getAddress(),
                              SuccessfulResponse.create(result));
                  } catch (Throwable e) {
View Full Code Here

Examples of org.infinispan.distexec.spi.DistributedTaskLifecycleService.onPreExecute()

      // 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();
View Full Code Here

Examples of org.infinispan.distexec.spi.DistributedTaskLifecycleService.onPreExecute()

               private V doLocalInvoke() throws Exception {
                  getCommand().init(cache);
                  DistributedTaskLifecycleService lifecycle = DistributedTaskLifecycleService.getInstance();
                  try {
                     // hook into lifecycle
                     lifecycle.onPreExecute(getCommand().getCallable(), cache);
                     cancellationService.register(Thread.currentThread(), getCommand().getUUID());
                     V result = getCommand().perform(null);
                     future.notifyDone(result);
                     return result;
                  } catch (Exception e) {
View Full Code Here

Examples of org.infinispan.distexec.spi.DistributedTaskLifecycleService.onPreExecute()

                  Object result = null;
                  getCommand().init(cache);
                  DistributedTaskLifecycleService lifecycle = DistributedTaskLifecycleService.getInstance();
                  try {
                     // hook into lifecycle
                     lifecycle.onPreExecute(getCommand().getCallable(), cache);
                     cancellationService.register(Thread.currentThread(), getCommand().getUUID());
                     result = getCommand().perform(null);
                     return Collections.singletonMap(getAddress(),
                              SuccessfulResponse.create(result));
                  } catch (Throwable e) {
View Full Code Here

Examples of org.infinispan.distexec.spi.DistributedTaskLifecycleService.onPreExecute()

      // 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();
View Full Code Here

Examples of org.infinispan.distexec.spi.DistributedTaskLifecycleService.onPreExecute()

                  Object result = null;
                  getCommand().init(cache);
                  DistributedTaskLifecycleService lifecycle = DistributedTaskLifecycleService.getInstance();
                  try {
                     // hook into lifecycle
                     lifecycle.onPreExecute(getCommand().getCallable(), cache);
                     cancellationService.register(Thread.currentThread(), getCommand().getUUID());
                     result = getCommand().perform(null);
                     return Collections.singletonMap(getAddress(),
                              SuccessfulResponse.create(result));
                  } catch (Throwable e) {
View Full Code Here

Examples of org.infinispan.distexec.spi.DistributedTaskLifecycleService.onPreExecute()

                  Object result = null;
                  getCommand().init(cache);
                  DistributedTaskLifecycleService lifecycle = DistributedTaskLifecycleService.getInstance();
                  try {
                     // hook into lifecycle
                     lifecycle.onPreExecute(getCommand().getCallable(), cache);
                     cancellationService.register(Thread.currentThread(), getCommand().getUUID());
                     result = getCommand().perform(null);
                     return Collections.singletonMap(getAddress(),
                              SuccessfulResponse.create(result));
                  } catch (Throwable e) {
View Full Code Here

Examples of org.infinispan.distexec.spi.DistributedTaskLifecycleService.onPreExecute()

                  Object result = null;
                  getCommand().init(cache);
                  DistributedTaskLifecycleService lifecycle = DistributedTaskLifecycleService.getInstance();
                  try {
                     // hook into lifecycle
                     lifecycle.onPreExecute(getCommand().getCallable(), cache);
                     cancellationService.register(Thread.currentThread(), getCommand().getUUID());
                     result = getCommand().perform(null);
                     return Collections.singletonMap(getAddress(),
                              SuccessfulResponse.create(result));
                  } catch (Throwable e) {
View Full Code Here

Examples of org.infinispan.distexec.spi.DistributedTaskLifecycleService.onPreExecute()

                  Object result = null;
                  getCommand().init(cache);
                  DistributedTaskLifecycleService lifecycle = DistributedTaskLifecycleService.getInstance();
                  try {
                     // hook into lifecycle
                     lifecycle.onPreExecute(getCommand().getCallable(), cache);
                     cancellationService.register(Thread.currentThread(), getCommand().getUUID());
                     result = getCommand().perform(null);
                     return Collections.singletonMap(getAddress(),
                              SuccessfulResponse.create(result));
                  } catch (Throwable e) {
View Full Code Here

Examples of org.infinispan.distexec.spi.DistributedTaskLifecycleService.onPreExecute()

               Object result = null;
               future.getCommand().init(cache);
               DistributedTaskLifecycleService taskLifecycleService = DistributedTaskLifecycleService.getInstance();
               try {
                  //hook into lifecycle
                  taskLifecycleService.onPreExecute(future.getCommand().getCallable());
                  result = future.getCommand().perform(null);
                  return Collections.singletonMap(rpc.getAddress(), SuccessfulResponse.create(result));
               } catch (Throwable e) {
                  return e;
               } finally {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.