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

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

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

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

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

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

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


RejectedExecutionHandlerjava.util.concurrent

Java 5.0

This interface defines an API for a handler
method invoked by a ThreadPoolExecutor when its
execute( ) method cannot accept any more
Runnable objects. This can occur when both the
thread pool and the queue of waiting tasks is full, or when the
THReadPoolExecutor has been shut down. Register an
instance of this class with the setRejectedExecutionHandler(
) method of ThreadPoolExecutor.
ThreadPoolExecutor includes several predefined
implementations of this interface as static member classes. If the
rejectedExecution( ) method cannot arrange for the
Runnable to be run and does not wish to simply
discard that task, it should throw a
RejectedExecutionException which propagates up to
the caller that submitted the task for execution.

public interface

RejectedExecutionHandler {
// Public Instance Methods
void

rejectedExecution (Runnable

r , ThreadPoolExecutor

executor );
}


Implementations


ThreadPoolExecutor.AbortPolicy,
ThreadPoolExecutor.CallerRunsPolicy,
ThreadPoolExecutor.DiscardOldestPolicy,
ThreadPoolExecutor.DiscardPolicy

Passed To


ScheduledThreadPoolExecutor.ScheduledThreadPoolExecutor(
),
ThreadPoolExecutor.{setRejectedExecutionHandler(
), ThreadPoolExecutor( )}

Returned By


ThreadPoolExecutor.getRejectedExecutionHandler( )


    / 1191