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 ComponentAvatars for them.
Method Summary
  __init__(self, vishnu)
  _startComponent(self, *args, **kwargs)
ComponentAvatar getComponentAvatarForState(self, state)
Return a component avatar for the given state.
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, componentAvatar)
This function registers a component in the heaven.
  removeComponent(self, componentAvatar)
Remove a component avatar from the heaven.
  removeMasterClock(self, componentAvatar)
Tell the given component to stop providing a master clock.
  setupComponent(self, *args, **kwargs)
  unregisterComponent(self, componentAvatar)
This function unregisters a component in the heaven.
    Inherited from ManagerHeaven
flumotion.manager.base.ManagerAvatar createAvatar(self, avatarId, remoteIdentity)
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.
dict doLog(self, level, where, format, *args, **kwargs)
Log a message at the given level, with the possibility of going higher up in the stack.
  error(self, *args)
Log an error.
  info(self, *args)
Log an informational message.
  log(self, *args)
Log a log message.
  logFunction(self, *args)
Overridable log function.
  logObjectName(self)
Overridable object name function.
  warning(self, *args)
Log a warning.
  warningFailure(self, failure, swallow)
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)

getComponentAvatarForState(self, state)

Return a component avatar for the given state.
Parameters:
state
           (type=flumotion.common.planet.ManagerComponentState)
Returns:
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

registerComponent(self, componentAvatar)

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

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)

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 0x2b41a6b66890>   

logCategory

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

Generated by Epydoc 2.1 on Fri Apr 6 10:13:41 2007 http://epydoc.sf.net