Acspy.ContainerActivationMap
index
/alma/ACS-2016.6/ACSSW/lib/python/site-packages/Acspy/ContainerActivationMap.py

#*******************************************************************************
# ALMA - Atacama Large Millimiter Array
# Copyright (c) European Southern Observatory, 2013 

# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.

# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.

# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
#
#
# who       when      what
# --------  --------  ----------------------------------------------
# acaproni  2013-11-29  created
#

 
Classes
       
__builtin__.object
ContainerActivationMap

 
class ContainerActivationMap(__builtin__.object)
    ContainerActivationMap remembers which components the container is 
activating/deactivating.
 
The purpose of this class is to avoid that concurrent calls at least 
-activate the same component at the same time.
-de-activate the same component at the same time.
-one activate a component that another calling is de-activating
 
The container registers in this class the name of the component
it is activating or deactivating.
If the same component is being activated or deactivated by another
thread then the container waits until the activation/deactivation
terminates and try again.
The container notifies when a component has been activated or
deactivated.
 
@param logger: The logger
 
  Methods defined here:
__init__(self, logger)
aboutToActivate(self, name)
The container is about to activate a component with the passed name 
 
@param name: The name of the component that the container is going to activate
aboutToDeactivate(self, name)
The container is about to deactivate a component with the passed name
 
@param name: The name of the component that the container is going to deactivate
activated(self, name)
A component with the passed name has been activated
 
@param name: The name of the activated component
deactivated(self, name)
A component with the passed name has been deactivated
 
@param name: The name of the deactivated component
isProcessing(self, name)
@param name: The name of the component to check 
@return: True if the container is processing a component with the pased name
numOfProcessingItems(self)
@return: The number of parallel operations that the container is performing

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)