com.sun.sgs.kernel
Interface TaskReservation

All Known Implementing Classes:
SimpleTaskReservation

public interface TaskReservation

This interface manages task reservations. Reservations are used to guarantee space in a scheduler for tasks. Once a reservation is acquired, the associated tasks will always have space to run. Acquiring a reservation does not actually schedule the tasks, so until use is called, the tasks will never run. The reservation may be cancelled if it has not yet been run, and no cost will be charged to the owner.

If this reservation includes tasks scheduled to be run at a specified time, and that time has already passed when use is called, then the tasks are run immediately.


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.
 

Method Detail

cancel

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

Throws:
IllegalStateException - if the reservation has already been used or cancelled

use

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

Throws:
IllegalStateException - if the reservation has already been used or cancelled

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