com.sun.sgs.impl.kernel.schedule
Class SimpleTaskReservation

java.lang.Object
  extended by com.sun.sgs.impl.kernel.schedule.SimpleTaskReservation
All Implemented Interfaces:
TaskReservation

 class SimpleTaskReservation
extends Object
implements TaskReservation

Package-private utility implementation of TaskReservation. These reservations are fairly light-weight, and assume that the queue is unbounded and therefore doesn't actually track these reservations or use them to actually reserve any space.


Constructor Summary
SimpleTaskReservation(SchedulerQueue queue, ScheduledTask task)
          Creates an instance of SimpleTaskReservation.
 
Method Summary
 void cancel()
          Cancels this reservation, releaseing the reserved space in the scheduler for the associated task or tasks.
 void use()
          Uses the reservation, scheduling all associated tasks to run.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTaskReservation

public SimpleTaskReservation(SchedulerQueue queue,
                             ScheduledTask task)
Creates an instance of SimpleTaskReservation.

Parameters:
queue - the associated SchedulerQueue
task - the ScheduledTask being reserved
Method Detail

cancel

public void cancel()
Cancels this reservation, releaseing the reserved space in the scheduler for the associated task or tasks.

Specified by:
cancel in interface TaskReservation

use

public void use()
Uses the reservation, scheduling all associated tasks to run.

Specified by:
use in interface TaskReservation

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