Class CpuLeaseSleepRollcallListener

  extended by org.mbari.siam.core.CpuLeaseSleepRollcallListener
All Implemented Interfaces:

public class CpuLeaseSleepRollcallListener
extends java.lang.Object
implements SleepRollCallListener

CpuLeaseSleepRollcallListener is responsible for keeping the CPU awake as requested by external processes.

Bob Herlien

Field Summary
Fields inherited from interface org.mbari.siam.distributed.SleepRollCallListener
Method Summary
 void cpuLease(int requestorID, long when, long howLong)
          Request that the CPU come on at a certain time in the future and/or remain on for a certain duration.
 java.util.Vector getLessees()
 long okToSleep()
          Return <= 0 if need to stay awake.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail


public void cpuLease(int requestorID,
                     long when,
                     long howLong)
              throws java.rmi.RemoteException
Request that the CPU come on at a certain time in the future and/or remain on for a certain duration.

requestorID - Unique ID (externally assigned) to identify who is requesting the CPU to remain on. Allows for multiple requestors each requesting that the CPU be on.
when - Milliseconds until the requestor needs the CPU on. Use 0 (zero) to request that the CPU remain on starting now.
howLong - Number of milliseconds that the CPU should remain on. Use 0 (zero) to cancel an earlier request.


public long okToSleep()
Return <= 0 if need to stay awake. Else, return number of milliseconds until we need to wake up.

Specified by:
okToSleep in interface SleepRollCallListener


public java.util.Vector getLessees()

Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.