Home | Trees | Indices | Help |
---|
|
The root of Haizea
This class is the root of Haizea. Pretty much everything else (scheduler, enactment modules, etc.) is contained in this class. The Manager class is meant to be a singleton.
|
|||
__metaclass__ A singleton metaclass. |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
instance = None
|
|
|||
Inherited from |
|
Initializes the manager. Argument: config -- a populated instance of haizea.common.config.RMConfig daemon -- True if Haizea must run as a daemon, False if it must run in the foreground pidfile -- When running as a daemon, file to save pid to
|
Daemonizes the Haizea process. Based on code in: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66012 |
Process any new requests in the request frontend Checks the request frontend to see if there are any new requests that have to be processed. AR leases are sent directly to the schedule. Best-effort leases are queued. Arguments: nexttime -- The next time at which the scheduler can allocate resources. This is meant to be provided by the clock simply as a sanity measure when running in real time (to avoid scheduling something "now" to actually have "now" be in the past once the scheduling function returns. i.e., nexttime has nothing to do with whether there are resources available at that time or not. |
Notifies an asynchronous event to Haizea. Arguments: lease_id -- ID of lease that is affected by event event -- Event (currently, only the constants.EVENT_END_VM event is supported) |
Cancels a lease. Arguments: lease_id -- ID of lease to cancel |
Loads persisted leases and scheduling information This method does three things: 1. Recover persisted leases. Note that not all persisted leases may be recoverable. For example, if a lease was scheduled to start at a certain time, but that time passed while Haizea was not running, the lease will simply be transitioned to a failed state. 2. Recover the queue. 3. Recover the list of "future leases" as determined by the backfilling algorithm. |
Handles an unrecoverable error. This method prints information on the unrecoverable error and makes Haizea panic. |
Handles an unrecoverable error. This method prints information on the unrecoverable error and makes Haizea panic. |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Dec 17 10:59:20 2009 | http://epydoc.sourceforge.net |