com.sun.sgs.kernel
Interface PriorityScheduler


public interface PriorityScheduler

This is an experimental interface to provide a way to test different thoughts on priority through a few basic scheduling methods that accept priority levels.


Method Summary
 TaskReservation reserveTask(KernelRunnable task, Identity owner, Priority priority)
          Reserves the ability to run the given task.
 void scheduleTask(KernelRunnable task, Identity owner, Priority priority)
          Schedules a task to run as soon as possible based on the specific scheduler implementation.
 

Method Detail

reserveTask

TaskReservation reserveTask(KernelRunnable task,
                            Identity owner,
                            Priority priority)
Reserves the ability to run the given task. The scheduler will make a best effort to honor the requested priority.

Parameters:
task - the KernelRunnable to execute
owner - the entity on who's behalf this task is run
priority - the requested Priority
Returns:
a TaskReservation for the task
Throws:
TaskRejectedException - if a reservation cannot be made

scheduleTask

void scheduleTask(KernelRunnable task,
                  Identity owner,
                  Priority priority)
Schedules a task to run as soon as possible based on the specific scheduler implementation. The scheduler will make a best effort to honor the requested priority.

Parameters:
task - the KernelRunnable to execute
owner - the entity on who's behalf this task is run
priority - the requested Priority
Throws:
TaskRejectedException - if the given task is not accepted

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved