pt.runtime
Enum ParaTask.ScheduleType

java.lang.Object
  extended by java.lang.Enum<ParaTask.ScheduleType>
      extended by pt.runtime.ParaTask.ScheduleType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ParaTask.ScheduleType>
Enclosing class:
ParaTask

public static enum ParaTask.ScheduleType
extends java.lang.Enum<ParaTask.ScheduleType>

Enum representing the possible schedules that ParaTask supports.

Author:
Nasser Giacaman, Oliver Sinnen

Enum Constant Summary
MixedSchedule
          A combination of work-stealing and work-sharing.
WorkSharing
          Tasks are queued to a shared global queue and are executed using a first in first out policy.
WorkStealing
          Tasks are queued to the queue local to the enqueing thread (or to a random thread's queue if the enqueing thread is not a worker thread).
 
Method Summary
static ParaTask.ScheduleType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ParaTask.ScheduleType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

WorkSharing

public static final ParaTask.ScheduleType WorkSharing
Tasks are queued to a shared global queue and are executed using a first in first out policy.


WorkStealing

public static final ParaTask.ScheduleType WorkStealing
Tasks are queued to the queue local to the enqueing thread (or to a random thread's queue if the enqueing thread is not a worker thread). Tasks are executed using a last in first out policy when taken from the thread's own queue. Otherwise, tasks are stolen from another thread's queue using a first in first out policy.


MixedSchedule

public static final ParaTask.ScheduleType MixedSchedule
A combination of work-stealing and work-sharing. When a task is enqueued by a worker thread, this behaves as work-stealing. When a task is enqueued by a non-worker thread (e.g. main thread or event dispatch thread), this behaves as work-sharing. A worker thread always favours to execute tasks from its local queue before helping with the global shared queue.

Method Detail

values

public static ParaTask.ScheduleType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ParaTask.ScheduleType c : ParaTask.ScheduleType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ParaTask.ScheduleType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null