org.sape.carbon.services.threadpool
Class QueueFullPolicyEnum

java.lang.Object
  |
  +--org.sape.carbon.core.util.enum.BaseEnum
        |
        +--org.sape.carbon.services.threadpool.QueueFullPolicyEnum
All Implemented Interfaces:
Serializable

public class QueueFullPolicyEnum
extends BaseEnum

This Class enumerates the different policies that can be used when the thread pool queue is full and a client attempts to queue a task. Copyright 2003 Sapient

Since:
carbon 2.1
Version:
$Revision: 1.2 $($Author: dvoet $ / $Date: 2003/11/20 18:49:59 $)
Author:
Douglas Voet, Nov 17, 2003
See Also:
Serialized Form

Nested Class Summary
static class QueueFullPolicyEnum.QueueFullPolicyEnumNotFoundException
          This class is a typesafe retriever exception for an enumeration
 
Nested classes inherited from class org.sape.carbon.core.util.enum.BaseEnum
 
Field Summary
static QueueFullPolicyEnum ABORT
          Abort signals ThreadPool to throw a RuntimeException.
static int ABORT_ORDINAL
           
static QueueFullPolicyEnum DISCARD
          Discard signals the ThreadPool to discard the current task.
static QueueFullPolicyEnum DISCARD_OLDEST
          Discard-oldest signals the ThreadPool to discard the task at the head of the queue.
static int DISCARD_OLDEST_ORDINAL
           
static int DISCARD_ORDINAL
           
static QueueFullPolicyEnum RUN
          Run signals that the ThreadPool should run the given task on client thread (i.e.
static int RUN_ORDINAL
           
static QueueFullPolicyEnum WAIT
          Wait signals that the ThreadPool should block the client thread (i.e.
static int WAIT_ORDINAL
           
 
Fields inherited from class org.sape.carbon.core.util.enum.BaseEnum
name, ordinal
 
Constructor Summary
private QueueFullPolicyEnum(String name, int ordinal)
           
 
Method Summary
static TaskStatusEnum getByName(String name)
          Strongly typed enum retriever
static TaskStatusEnum getByOrdinal(int ordinal)
          Strongly typed enum retriever
(package private)  Object readResolve()
          Overrides part of serialization to return a reference to an existing static Enumeration
 
Methods inherited from class org.sape.carbon.core.util.enum.BaseEnum
equals, getByName, getByOrdinal, getName, getOrdinal, hashCode, iterator, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RUN_ORDINAL

public static final int RUN_ORDINAL
See Also:
Constant Field Values

RUN

public static final QueueFullPolicyEnum RUN
Run signals that the ThreadPool should run the given task on client thread (i.e. the thread that called the execute method)


WAIT_ORDINAL

public static final int WAIT_ORDINAL
See Also:
Constant Field Values

WAIT

public static final QueueFullPolicyEnum WAIT
Wait signals that the ThreadPool should block the client thread (i.e. the thread that called the execute method) until there is room on the queue. This option could potentially lead to lockups


ABORT_ORDINAL

public static final int ABORT_ORDINAL
See Also:
Constant Field Values

ABORT

public static final QueueFullPolicyEnum ABORT
Abort signals ThreadPool to throw a RuntimeException.


DISCARD_ORDINAL

public static final int DISCARD_ORDINAL
See Also:
Constant Field Values

DISCARD

public static final QueueFullPolicyEnum DISCARD
Discard signals the ThreadPool to discard the current task.


DISCARD_OLDEST_ORDINAL

public static final int DISCARD_OLDEST_ORDINAL
See Also:
Constant Field Values

DISCARD_OLDEST

public static final QueueFullPolicyEnum DISCARD_OLDEST
Discard-oldest signals the ThreadPool to discard the task at the head of the queue.

Constructor Detail

QueueFullPolicyEnum

private QueueFullPolicyEnum(String name,
                            int ordinal)
Method Detail

getByName

public static final TaskStatusEnum getByName(String name)
                                      throws QueueFullPolicyEnum.QueueFullPolicyEnumNotFoundException
Strongly typed enum retriever

QueueFullPolicyEnum.QueueFullPolicyEnumNotFoundException

getByOrdinal

public static final TaskStatusEnum getByOrdinal(int ordinal)
                                         throws QueueFullPolicyEnum.QueueFullPolicyEnumNotFoundException
Strongly typed enum retriever

QueueFullPolicyEnum.QueueFullPolicyEnumNotFoundException

readResolve

final Object readResolve()
                  throws ObjectStreamException
Overrides part of serialization to return a reference to an existing static Enumeration

ObjectStreamException


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.