Java in a Nutshell, 5th Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Java in a Nutshell, 5th Edition [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید


ExecutorCompletionService<V>java.util.concurrent

Java 5.0

This class implements the
CompletionService interface, which uses an
Executor object passed to its constructor for
executing the tasks passed to its submit( )
method. As these tasks complete, their result (or exception) is
placed, in the form of a Future object, on an
internal queue and becomes available for removal with the blocking
take( ) method or the nonblocking or timed
poll( ) methods.

This class is useful when you want to execute a number of tasks
concurrently and want to process their results in whatever order they
complete. See Executors for a source of
Executor objects to use with this class.


Figure 16-83. java.util.concurrent.ExecutorCompletionService<V>

public class

ExecutorCompletionService<V> implements CompletionService<V> {
// Public Constructors
public

ExecutorCompletionService (Executor

executor );
public

ExecutorCompletionService (Executor

executor , BlockingQueue<Future<V>>

completionQueue );
// Methods Implementing CompletionService
public Future<V>

poll ( );
public Future<V>

poll (long

timeout , TimeUnit

unit ) throws InterruptedException;
public Future<V>

submit (Callable<V>

task );
public Future<V>

submit (Runnable

task , V

result );
public Future<V>

take ( ) throws InterruptedException;
}



    / 1191