Package flumotion :: Package manager :: Module component :: Class ComponentHeaven
[show private | hide private]
[frames | no frames]

Class ComponentHeaven

             Loggable --+    
                        |    
Jellyable --+           |    
            |           |    
 Serializable --+       |    
                |       |    
    Referenceable --+   |    
                    |   |    
                 Root --+    
                        |    
            ManagerHeaven --+
                            |
                           ComponentHeaven


I handle all registered components and provide avatars for them.
Method Summary
  __init__(self, vishnu)
  checkComponentStart(self, readiness, componentAvatar)
Check if the component can start up, and start it if it can.
twisted.internet.defer.Deferred getMasterClockInfo(self, avatarId, waiterId)
Get the master clock information from the given clock master component.
twisted.internet.defer.Deferred provideMasterClock(self, componentAvatar)
Tell the given component to provide a master clock.
  registerComponent(self, *args, **kwargs)
  removeComponent(self, componentAvatar)
Remove a component avatar from the heaven.
  removeMasterClock(self, componentAvatar)
Tell the given component to stop providing a master clock.
  setFeederReadiness(self, componentAvatar, feedName, readiness)
Tell the feeder set that the given feed on the given component is ready.
  unregisterComponent(self, componentAvatar)
This function unregisters a component in the heaven.
    Inherited from ManagerHeaven
flumotion.manager.base.ManagerAvatar createAvatar(self, avatarId)
Create a new avatar and manage it.
ManagerAvatar getAvatar(self, avatarId)
Get the avatar with the given id.
list of ManagerAvatar getAvatars(self)
Get all avatars in this heaven.
bool hasAvatar(self, avatarId)
Check if a component with that name is registered.
  removeAvatar(self, avatarId)
Stop managing the given avatar.
    Inherited from Root
  rootObject(self, broker)
A pb.BrokerFactory is requesting to publish me as a root object.
    Inherited from Referenceable
  jellyFor(self, jellier)
(internal)
  remoteMessageReceived(self, broker, message, args, kw)
A remote message has been received.
    Inherited from Serializable
  processUniqueID(self)
Return an ID which uniquely represents this object for this process.
    Inherited from Jellyable
  getStateFor(self, jellier)
    Inherited from Loggable
  debug(self, *args)
Log a debug message.
  error(self, *args)
Log an error.
  info(self, *args)
Log an informational message.
  log(self, *args)
Log a log message.
  logFunction(self, message)
Overridable log function.
  logObjectName(self)
Overridable object name function.
  warning(self, *args)
Log a warning.
  warningFailure(self, failure)
Log a warning about a Failure.

Instance Variable Summary
    Inherited from ManagerHeaven
dict of str -> ManagerAvatar avatars: a dict of avatarId -> Avatar
flumotion.manager.manager.Vishnu vishnu: the Vishnu in control of all the heavens

Class Variable Summary
Implements __implemented__ = <implementedBy flumotion.manager.compo...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
NoneType avatarClass = flumotion.manager.component.ComponentAvatar
str logCategory: Implementors can provide a category to log their messages under.
    Inherited from Referenceable
NoneType perspective = None                                                                  
    Inherited from Jellyable
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...

Method Details

__init__(self, vishnu)
(Constructor)

Parameters:
vishnu - the Vishnu in control of all the heavens
           (type=flumotion.manager.manager.Vishnu)
Overrides:
flumotion.manager.base.ManagerHeaven.__init__ (inherited documentation)

checkComponentStart(self, readiness, componentAvatar)

Check if the component can start up, and start it if it can. This depends on whether the components and feeders it depends on have started.
Parameters:
componentAvatar - the component to check
           (type=flumotion.manager.component.ComponentAvatar)

getMasterClockInfo(self, avatarId, waiterId=None)

Get the master clock information from the given clock master component.
Parameters:
avatarId - the id of the clock master
           (type=str)
waiterId - the id of the requesting component
           (type=str)
Returns:
a deferred firing an (ip, port, base_time) triple.
           (type=twisted.internet.defer.Deferred)

provideMasterClock(self, componentAvatar)

Tell the given component to provide a master clock. Trigger all deferreds waiting on this componentAvatar to provide a master clock.
Parameters:
componentAvatar
           (type=ComponentAvatar)
Returns:
twisted.internet.defer.Deferred

removeComponent(self, componentAvatar)

Remove a component avatar from the heaven.
Parameters:
componentAvatar - the component to remove
           (type=flumotion.manager.component.ComponentAvatar)

removeMasterClock(self, componentAvatar)

Tell the given component to stop providing a master clock.
Parameters:
componentAvatar
           (type=ComponentAvatar)

setFeederReadiness(self, componentAvatar, feedName, readiness)

Tell the feeder set that the given feed on the given component is ready.
Parameters:
componentAvatar - the component containing the feed
           (type=str)
feedName - the feed set to ready
           (type=str)
readiness - whether this feed has become ready or not
           (type=boolean)

unregisterComponent(self, componentAvatar)

This function unregisters a component in the heaven. It is triggered when the mind is detached.
Parameters:
componentAvatar - the component to unregister
           (type=flumotion.manager.component.ComponentAvatar)

Class Variable Details

__implemented__

Type:
Implements
Value:
<implementedBy flumotion.manager.component.ComponentHeaven>            

__provides__

Type:
ClassProvides
Value:
<zope.interface.declarations.ClassProvides object at 0x720734b0>       

logCategory

Implementors can provide a category to log their messages under.
Type:
str
Value:
'comp-heaven'                                                          

Generated by Epydoc 2.1 on Sun Oct 22 03:16:43 2006 http://epydoc.sf.net