Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-2287

Introduce DistributedTask abstraction enhancement for distributed executors

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 5.2.0.Final
    • 5.2.0.Final
    • Clustered Executor
    • None

      As we have requirements to add timeout, pluggable fail over policies, topology aware target selection policies to distributed executors we have to create a new abstraction DistributedTask that users can submit to DistributedExecutorService. We will provide builder for DistributedTask, keep the existing four submit methods in DistributedExecutorService and add four new methods with DistributedTask abstraction in place of Callable. See below:

      interface DistributedExecutorService {
        … existing methods … 
          <T> List<Future<T>> submitEverywhere(DistributedTask<T> callable);
      }
      
      class DistributedTaskBuilder<T> {
         DistributedTaskBuilder<T> callable(Callable<T> callable);
         DistributedTaskBuilder<T> timeout(long t, TimeUnit tu);
         DistributedTaskBuilder<T> executionPolicy(DistributedExecutionPolicy p);
         DistributedTask<T> build();   
      }
      

              vblagoje Vladimir Blagojevic (Inactive)
              vblagoje Vladimir Blagojevic (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: