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

Class Vishnu

Loggable --+
           |
          Vishnu


I am the toplevel manager object that knows about all heavens and factories.
Method Summary
  __init__(self, name, unsafeTracebacks)
  componentAddMessage(self, avatarId, message)
Set the given message on the given component's state.
  componentAttached(self, componentAvatar)
  componentCreate(self, componentState)
Create the given component.
  componentDetached(self, componentAvatar)
  deleteFlow(self, *args, **kwargs)
  emptyPlanet(self)
Empty the planet of all components, and flows.
flumotion.common.bundle.BundlerBasket getBundlerBasket(self)
Return a bundler basket to unbundle from.
ComponentMapper or None getComponentMapper(self, object)
Look up an object mapper given the object.
  getComponentStates(self)
  getConfiguration(self)
Returns the manager's configuration as a string suitable for importing via loadConfiguration().
  getFactory(self)
  loadConfiguration(self, *args, **kwargs)
  registerComponent(self, componentAvatar)
  releasePortsOnWorker(self, workerName, ports)
Tells the manager that the given ports are no longer being used, and may be returned to the allocation pool.
  reservePortsOnWorker(self, workerName, numPorts)
Requests a number of ports on the worker named workerName.
  setBouncer(self, bouncer)
  unregisterComponent(self, componentAvatar)
  workerAttached(self, workerAvatar)
  workerDetached(self, workerAvatar)
  _addComponent(self, config, parent)
Add a component state for the given component config entry.
  _configToComponentState(self, config, avatar)
  _createCallback(self, result, componentState)
  _createErrback(self, failure, state)
  _createHeaven(self, interface, klass)
Create a heaven of the given klass that will send avatars to clients implementing the given medium interface.
  _emptyPlanetCallback(self, result)
  _getComponentsToStart(self)
  _workerCreateComponentDelayed(self, result, workerAvatar, componentState, type, config)
  _workerCreateComponents(self, workerAvatar, components)
Create the list of components on the given worker, sequentially, but in no specific order.
    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.

Class Variable Summary
str logCategory: Implementors can provide a category to log their messages under.
    Inherited from Loggable
Implements __implemented__ = <implementedBy flumotion.common.log.Lo...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...

Method Details

componentAddMessage(self, avatarId, message)

Set the given message on the given component's state. Can be called e.g. by a worker to report on a crashed component.

componentCreate(self, componentState)

Create the given component. This will currently also trigger a start eventually when the component avatar attaches.

The component should be sleeping. The worker it should be started on should be present.

emptyPlanet(self)

Empty the planet of all components, and flows.
Returns:
a deferred that will fire when the planet is empty.

getBundlerBasket(self)

Return a bundler basket to unbundle from. If the registry files were updated since the last time, the bundlerbasket will be rebuilt.
Returns:
flumotion.common.bundle.BundlerBasket

Since: 0.2.2

getComponentMapper(self, object)

Look up an object mapper given the object.
Returns:
ComponentMapper or None

getConfiguration(self)

Returns the manager's configuration as a string suitable for importing via loadConfiguration().

releasePortsOnWorker(self, workerName, ports)

Tells the manager that the given ports are no longer being used, and may be returned to the allocation pool.

reservePortsOnWorker(self, workerName, numPorts)

Requests a number of ports on the worker named workerName. The ports will be reserved for the use of the caller until releasePortsOnWorker is called.
Returns:
a list of ports as integers

setBouncer(self, bouncer)

Parameters:
bouncer
           (type=flumotion.component.bouncers.bouncer.Bouncer)

_addComponent(self, config, parent)

Add a component state for the given component config entry.
Returns:
flumotion.common.planet.ManagerComponentState

_createHeaven(self, interface, klass)

Create a heaven of the given klass that will send avatars to clients implementing the given medium interface.
Parameters:
interface - the medium interface to create a heaven for
           (type=flumotion.common.interfaces.IMedium)
klass - the type of heaven to create
           (type=an implementor of flumotion.common.interfaces.IHeaven)

_workerCreateComponents(self, workerAvatar, components)

Create the list of components on the given worker, sequentially, but in no specific order.
Parameters:
workerAvatar
           (type=flumotion.manager.worker.WorkerAvatar)
components
           (type=list of flumotion.common.planet.ManagerComponentState)

Class Variable Details

logCategory

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

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