@Test public void executionContinuesAfterException() throws Exception { MultiKeySequentialExecutor<String> executor = new MultiKeySequentialExecutor<>(2); executor.submit("a", () -> { throw new RuntimeException(); }); boolean[] secondWasExecuted = new boolean[]{false}; executor.submit("a", () -> { secondWasExecuted[0] = true; }) .get(); Assert.assertTrue(secondWasExecuted[0]); }
public CompletableFuture<Void> submit(K key, Runnable task) { return sequentialExecutors.computeIfAbsent(key, k -> new SequentialExecutor()) .submit(task); }
MultiKeySequentialExecutor { public CompletableFuture<Void> submit(K key, Runnable task) { return sequentialExecutors.computeIfAbsent(key, k -> new SequentialExecutor()) .submit(task); } }
MultiKeySequentialExecutor { public CompletableFuture<Void> submit(K key, Runnable task) { return sequentialExecutors.computeIfAbsent(key, k -> new SequentialExecutor()) .submit(task); } MultiKeySequentialExecutor(int nThreads);  MultiKeySequentialExecutor(ExecutorService executorService); }
MultiKeySequentialExecutor { public CompletableFuture<Void> submit(K key, Runnable task) { return sequentialExecutors.computeIfAbsent(key, k -> new SequentialExecutor()) .submit(task); } MultiKeySequentialExecutor(int nThreads);  MultiKeySequentialExecutor(ExecutorService executorService); CompletableFuture<Void> submit(K key, Runnable task); CompletableFuture<V> submit(K key, Supplier<V> task); void closeForKey(K key); SequentialExecutor getExecutorForKey(K key); }
MultiKeySequentialExecutor { public CompletableFuture<Void> submit(K key, Runnable task) { return sequentialExecutors.computeIfAbsent(key, k -> new SequentialExecutor()) .submit(task); } MultiKeySequentialExecutor(int nThreads);  MultiKeySequentialExecutor(ExecutorService executorService); CompletableFuture<Void> submit(K key, Runnable task); CompletableFuture<V> submit(K key, Supplier<V> task); void closeForKey(K key); SequentialExecutor getExecutorForKey(K key);  }