Package de.bamberg.ha.api.cluster

Examples of de.bamberg.ha.api.cluster.DistributedExecution


     
      Method method=obj.getClass().getMethod(methodName, paramClasses);
     
      ExecutorService executorService = null;
      if (method.isAnnotationPresent(DistributedExecution.class) ) {
        DistributedExecution executionTarget=method.getAnnotation(DistributedExecution.class);
        switch (executionTarget.value()) {
            case PICKED_BY_SYSTEM :
                        log.debug("distributed execution on member picked by system");
                        executorService=Hazelcast.getExecutorService();
                        futureResult = executorService.submit (callable);
                        break;
            case KEY_OWNER :
                        log.debug("distributed execution on key owner");
                        executionTarget.key();
                        FutureTask<DistributedExecutionResult> task = new DistributedTask<DistributedExecutionResult>(callable, parameter[0]);
                        executorService=Hazelcast.getExecutorService();
                        executorService.submit (task);
                        futureResult =task;
                        break;
View Full Code Here

TOP

Related Classes of de.bamberg.ha.api.cluster.DistributedExecution

Copyright © 2018 www.massapicom. 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.