org.richfaces.resource.optimizer.concurrent

## Class CountingExecutorCompletionService<T>

- java.lang.Object
- - java.util.concurrent.ExecutorCompletionService<T>
  - - org.richfaces.resource.optimizer.concurrent.CountingExecutorCompletionService<T>

- All Implemented Interfaces:
    CompletionService<T>

      public class CountingExecutorCompletionService<T>
      extends ExecutorCompletionService<T>

  Author:
    Nick Belaevski

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CountingExecutorCompletionService(Executor executor)`
    `CountingExecutorCompletionService(Executor executor, BlockingQueue<Future<T>> completionQueue)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Future<T>` | `submit(Callable<T> task)`
    `Future<T>` | `submit(Runnable task, T result)`
    `Future<T>` | `take()`
    `String` | `toString()`

    - ### Methods inherited from class java.util.concurrent.ExecutorCompletionService

      `poll, poll`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### CountingExecutorCompletionService

          public CountingExecutorCompletionService(Executor executor)

    - #### CountingExecutorCompletionService

          public CountingExecutorCompletionService(Executor executor,
                                           BlockingQueue<Future<T>> completionQueue)

  - ### Method Detail

    - #### submit

          public Future<T> submit(Callable<T> task)

      Specified by:
        `submit` in interface `CompletionService<T>`
      Overrides:
        `submit` in class `ExecutorCompletionService<T>`

    - #### submit

          public Future<T> submit(Runnable task,
                         T result)

      Specified by:
        `submit` in interface `CompletionService<T>`
      Overrides:
        `submit` in class `ExecutorCompletionService<T>`

    - #### take

          public Future<T> take()
                         throws InterruptedException

      Specified by:
        `take` in interface `CompletionService<T>`
      Overrides:
        `take` in class `ExecutorCompletionService<T>`
      Throws:
        `InterruptedException`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2016 JBoss by Red Hat. All Rights Reserved.