Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

com::cosylab::acs::maci::manager::ManagerImpl Class Reference

Inheritance diagram for com::cosylab::acs::maci::manager::ManagerImpl:

Inheritance graph
[legend]
Collaboration diagram for com::cosylab::acs::maci::manager::ManagerImpl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void initialize (Prevayler prevayler, CDBAccess cdbAccess, Context context, Logger logger, ManagerContainerServices managerContainerServices)
int getHandle ()
void setDomain (String domain)
String getDomain ()
ContainerInfo[] getContainerInfo (int id, int[] handles, String name_wc) throws AcsJNoPermissionEx
ClientInfo[] getClientInfo (int id, int[] handles, String name_wc) throws AcsJNoPermissionEx
ComponentInfo[] getComponentInfo (int id, int[] handles, String name_wc, String type_wc, boolean activeOnly) throws AcsJNoPermissionEx
Component getService (int id, URI curl, boolean activate, StatusHolder status) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx
Component getComponent (int id, URI curl, boolean activate, StatusHolder status) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx
Component getComponentNonSticky (int id, URI curl) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx
void makeComponentImmortal (int id, URI curl, boolean immortalState) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx, AcsJBadParameterEx
ClientInfo login (Client reference) throws AcsJNoPermissionEx
void logout (int id) throws AcsJNoPermissionEx
int registerComponent (int id, URI curl, String type, Component component) throws AcsJNoPermissionEx, AcsJBadParameterEx
void unregisterComponent (int id, int h) throws AcsJNoPermissionEx, AcsJBadParameterEx
Component restartComponent (int id, URI curl) throws AcsJNoPermissionEx, AcsJBadParameterEx
int releaseComponent (int id, URI curl) throws AcsJNoPermissionEx, AcsJBadParameterEx
int forceReleaseComponent (int id, URI curl) throws AcsJNoPermissionEx, AcsJBadParameterEx
void releaseComponents (int id, URI[] curls) throws AcsJNoPermissionEx
void shutdownContainer (int id, String containerName, int action) throws AcsJNoPermissionEx
void shutdown (int id, int containers) throws AcsJNoPermissionEx
ClientInfo getClientInfo (int id)
ComponentInfo getComponentInfo (int id)
ComponentInfo getDefaultComponent (int id, String type) throws AcsJNoPermissionEx, NoDefaultComponentException
ComponentInfo getDynamicComponent (int id, ComponentSpec componentSpec, boolean markAsDefault) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx, AcsJIncompleteComponentSpecEx, AcsJInvalidComponentSpecEx, AcsJComponentSpecIncompatibleWithActiveComponentEx
ComponentInfo[] getDynamicComponents (int id, ComponentSpec[] components) throws AcsJNoPermissionEx
ComponentInfo getCollocatedComponent (int id, ComponentSpec componentSpec, boolean markAsDefault, URI targetComponentURI) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx, AcsJIncompleteComponentSpecEx, AcsJInvalidComponentSpecEx, AcsJComponentSpecIncompatibleWithActiveComponentEx
boolean isServiceComponent (String name)
void initializeFederation (Hashtable federationDirectoryProperties) throws CoreException
String toString ()
HandleDataStore getContainers ()
HandleDataStore getAdministrators ()
HandleDataStore getClients ()
HandleDataStore getComponents ()
Map getUnavailableComponents ()
Map getDefaultComponents ()
Context getRemoteDirectory ()
void setTransport (Transport transport)
void setRemoteDirectory (Context remoteDirectory)
Object getManagerComponentReference ()
Object getRemoteDirectoryComponentReference ()
void setManagerComponentReference (Object managerComponentReference)
void setRemoteDirectoryComponentReference (Object remoteDirectoryComponentReference)
boolean isShuttingDown ()
ManagerShutdown getShutdownImplementation ()
void setShutdownImplementation (ManagerShutdown shutdownImplementation)
long getLockTimeout ()
void setLockTimeout (long l)
void setCDBAccess (CDBAccess cdbAccess)
HashSet getActiveAlarms ()
boolean hasActiveAlarm (String faultMember)
void alarmRaised (String faultMember)
void alarmCleared (String faultMember)

Protected Member Functions

synchronized long generateExecutionId ()

Private Member Functions

void reportException (Throwable th)
void initializeDefaultConfiguration ()
void initializePingTasks ()
void checkLoadBalancingStrategy ()
Component getComponent (int id, URI curl, boolean activate, StatusHolder status, boolean allowServices) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx
void checkContainerShutdownState (ContainerInfo containerInfo) throws NoResourcesException
void releaseComponents (ComponentInfo[] infos) throws AcsJNoPermissionEx
ClientInfo containerLogin (String name, AuthenticationData reply, Container container, long timeStamp, long executionId) throws AcsJNoPermissionEx
void containerPostLoginActivation (final ContainerInfo containerInfo, boolean recoverContainer)
void containerInternalStateMerge (ContainerInfo containerInfo, boolean recoverContainer) throws AcsJNoPermissionEx
boolean hasCDBEntry (ComponentInfo componentInfo)
ClientInfo administratorLogin (String name, AuthenticationData reply, Administrator administrator, long timeStamp, long executionId) throws AcsJNoPermissionEx
ClientInfo clientLogin (String name, AuthenticationData reply, Client client, long timeStamp, long executionId) throws AcsJNoPermissionEx
void containerLogout (int id)
void makeUnavailable (ComponentInfo componentInfo)
void clientLogout (int id)
void administratorLogout (int id)
ClientInfo[] getAdministrators (int excludeHandle)
ContainerInfo[] getContainersInfo ()
ClientInfo[] getClientInfo ()
ClientInfo[] getClients (int excludeHandle, int[] handles)
void removeComponentOwner (int componentHandle, int owner)
void addComponentOwner (int componentHandle, int owner)
void notifyClientLogin (final ClientInfo clientInfo, final long timeStamp, final long executionId)
void notifyContainerLogin (final ContainerInfo containerInfo, final long timeStamp, final long executionId)
void notifyClientLogout (final ClientInfo clientInfo, final long timeStamp)
void notifyContainerLogout (final ContainerInfo containerInfo, final long timeStamp)
void notifyContainerDisconnectShutdown (int code)
void notifyContainerShutdownOrder (ContainerInfo containerInfo, int[] handles)
void notifyClientDisconnectShutdown ()
void notifyComponentRequested (int[] requestors, int[] components, final long timeStamp)
void notifyComponentActivated (final ComponentInfo componentInfo, final long timeStamp, final long executionId)
void notifyComponentDeactivated (final int handle, final long timeStamp)
void notifyComponentReleased (int[] requestors, int[] components, final long timeStamp)
void notifyComponentAvailable (int excludeClient, int[] clientHandles, ComponentInfo[] info)
void notifyComponentUnavailable (int excludeClient, int[] clientHandles, String[] names)
void sendMessage (Client client, String message, MessageType messageType)
void sendMessage (Client client, String message, MessageType messageType, short messageID)
void securityCheck (int id, int requiredRights) throws AcsJNoPermissionEx
ContainerInfo getContainerInfo (int id)
ContainerInfo getContainerInfo (String name)
Component internalRequestComponent (int requestor, URI curl, StatusHolder status) throws AcsJCannotGetComponentEx
Component internalRequestComponent (int requestor, URI curl, StatusHolder status, boolean activate) throws AcsJCannotGetComponentEx
ArrayList doCycleCheck (int requestor, int requested)
void checkCyclicDependency (int requestor, String requestedComponentName) throws AcsJCyclicDependencyDetectedEx
ComponentInfo internalRequestComponent (int requestor, String name, String type, String code, String containerName, int keepAliveTime, StatusHolder status, boolean activate) throws AcsJCannotGetComponentEx, AcsJSyncLockFailedEx, AcsJComponentSpecIncompatibleWithActiveComponentEx
ComponentInfo internalNoSyncRequestComponent (int requestor, String name, String type, String code, String containerName, int keepAliveTime, StatusHolder status, boolean activate) throws AcsJCannotGetComponentEx, AcsJComponentSpecIncompatibleWithActiveComponentEx
int internalReleaseComponent (int owner, URI curl, boolean force) throws AcsJNoPermissionEx, AcsJBadParameterEx
void internalDeactivateComponent (String name)
int internalReleaseComponent (int owner, int h, boolean force) throws AcsJNoPermissionEx, AcsJBadParameterEx
int internalNoSyncReleaseComponent (int owner, int h, boolean force) throws AcsJNoPermissionEx
void internalNoSyncDeactivateComponent (ComponentInfo componentInfo)
ContainerInfo startUpContainer (String containerName)
void conditionalShutdownContainer (ContainerInfo containerInfo)
Component internalRestartComponent (int owner, URI curl) throws AcsJNoPermissionEx
Component internalRestartComponent (int owner, int h) throws AcsJNoPermissionEx
Component internalNoSyncRestartComponent (int owner, int h) throws AcsJNoPermissionEx
ComponentInfo internalRequestDefaultComponent (int requestor, String type) throws NoDefaultComponentException
String[] searchDynamicComponent (String[] fieldNames, String[] requiredValues, boolean[] equalityRequired, int[] equalityPoints, IntHolder keepAliveTimeHolder)
ComponentInfo internalRequestDynamicComponent (int requestor, ComponentSpec componentSpec) throws AcsJCannotGetComponentEx, AcsJSyncLockFailedEx, AcsJNoPermissionEx, AcsJIncompleteComponentSpecEx, AcsJInvalidComponentSpecEx, AcsJComponentSpecIncompatibleWithActiveComponentEx
void bind (String name, String type, Object object)
void bind (Context remoteDirectory, String name, String type, Object object)
void rebind (Context remoteDirectory, String name, String type, Object object)
Object lookup (String name, String type)
Object lookup (Context remoteDirectory, String name, String type)
void unbind (String name, String type)
void unbind (Context remoteDirectory, String name, String type)
void cleanupEmptyFContext (Context remoteDirectory, String name)
String getRequestorName (int id)
void checkCURL (URI curl) throws AcsJBadParameterEx
void checkCURL (URI curl, boolean allowNonLocalDomains) throws AcsJBadParameterEx
boolean isLocalDomainCURL (URI curl)
String extractName (URI curl)
boolean acquireSynchronizationObject (String name, long msec)
void releaseSynchronizationObject (String name)
void releaseSynchronizationObject (String name, boolean release)
synchronized DAOProxy getManagerDAOProxy ()
void readManagerConfiguration ()
synchronized void destroyManagerDAOProxy ()
synchronized DAOProxy getComponentsDAOProxy ()
String[] getComponentsList ()
String[] refreshComponentsList (DAOProxy dc)
synchronized void destroyComponetsDAOProxy ()
synchronized DAOProxy getContainersDAOProxy ()
synchronized void destroyContainersDAOProxy ()
DAOProxy createDAO (String entity)
String readStringCharacteristics (DAOProxy dao, String path)
String readStringCharacteristics (DAOProxy dao, String path, boolean silent)
int readLongCharacteristics (DAOProxy dao, String path, int defaultValue, boolean silent)
double readDoubleCharacteristics (DAOProxy dao, String path, double defaultValue, boolean silent)
void destroyDAO (DAOProxy dao)
synchronized Manager getManagerForDomain (String domainName)
void finalizeFederation ()
Serializable executeCommand (Command command)

Static Private Member Functions

String dottedToHierarchical (String dottedName)
String convertToHiearachical (String componentName)

Private Attributes

String domain = DEFAULT_DOMAIN
int handle = MANAGER_MASK
HandleDataStore clients = new HandleDataStore(16, HANDLE_MASK)
HandleDataStore administrators = new HandleDataStore(16, HANDLE_MASK)
HandleDataStore containers = new HandleDataStore(32, HANDLE_MASK)
HandleDataStore components = new HandleDataStore(128, HANDLE_MASK)
Map unavailableComponents = new HashMap()
transient Map pendingActivations = null
transient Set pendingContainerShutdown = null
transient Object containerLoggedInMonitor = null
Map defaultComponents = new HashMap()
transient Random random = null
transient Timer heartbeatTask = null
transient Timer delayedDeactivationTask = null
transient Context remoteDirectory = null
transient Object managerComponentReference = null
transient Object remoteDirectoryComponentReference = null
transient Map activationSynchronization
transient ReaderPreferenceReadWriteLock activationPendingRWLock
transient AtomicBoolean shutdown
transient ThreadPoolExecutor threadPool
transient int poolThreads
transient long lockTimeout
transient int clientPingInterval
transient int administratorPingInterval
transient int containerPingInterval
transient ManagerShutdown shutdownImplementation = null
transient CDBAccess cdbAccess = null
transient DAOProxy managerDAO = null
transient DAOProxy componentsDAO = null
transient DAOProxy containersDAO = null
transient String[] componentListCache = null
transient ComponentSpec cdbActivation = null
transient LoadBalancingStrategy loadBalancingStrategy = null
transient boolean federationEnabled = false
transient Context federationDirectory = null
HashSet domains = new HashSet()
transient Map managerCache = null
transient Prevayler prevayler = null
transient Transport transport = null
transient ComponentInfoTopologicalSortManager topologySortManager
transient Logger logger
transient ACSAlarmSystemInterface alarmSource
HashSet activeAlarms = new HashSet()
transient long lastExecutionId = 0
volatile int originalId = MANAGER_MASK
volatile int originalContainers = 0

Static Private Attributes

final long serialVersionUID = 400178933049243893L
final ObjectStreamField[] serialPersistentFields
final int INTERDOMAIN_MANAGER_HANDLE = 0x05555555
final String DEFAULT_DOMAIN = ""
final int CONTAINER_RIGHTS = AccessRights.NONE
final String NAME_CDB_COMPONENTSPEC = "ACS.CDBComponentSpec"
final String NAME_LOAD_BALANCING_STRATEGY = "ACS.LoadBalancingStrategy"
final String NAME_CDB_DISABLE = "ACS.disableCDB"
final String CURL_URI_SCHEMA = "curl://"
final String NAME_DOMAIN_LIST = "ACS.domains"
final String NAME_DOMAIN_DIRECTORY = "ACS.federationDirectory"

Detailed Description

This class is an implementation of MACI com.cosylab.acs.maci.Manager. It provides the actual internal implementation of the Manager functionality in a way independent from the ACS maci Manager IDL interface.

Author:
Matej Sekoranja (matej.sekoranja@cosylab.com)
Version:
@VERSION@
See also:
Manager


Member Function Documentation

boolean com::cosylab::acs::maci::manager::ManagerImpl::acquireSynchronizationObject String  name,
long  msec
[inline, private]
 

Acquire synchronization lock for named object.

Parameters:
name name of the object whose lock to acquire.
msecs the number of milleseconds to wait. An argument less than or equal to zero means not to wait at all.
Returns:
true if acquired, false othwerwise.

void com::cosylab::acs::maci::manager::ManagerImpl::addComponentOwner int  componentHandle,
int  owner
[inline, private]
 

Add component handle to the owners list.

Parameters:
componentHandle component handle to be addd to the owners list.
owner owner whom to add the ownership.

ClientInfo com::cosylab::acs::maci::manager::ManagerImpl::administratorLogin String  name,
AuthenticationData  reply,
Administrator  administrator,
long  timeStamp,
long  executionId
throws AcsJNoPermissionEx [inline, private]
 

Administrator specific login method.

Parameters:
name name of the administrator
reply reply to authenticate method
administrator administrator that is logging in
Returns:
ClientInfo client info. of newly logged administrator

void com::cosylab::acs::maci::manager::ManagerImpl::administratorLogout int  id  )  [inline, private]
 

Administrator specific logout method

Parameters:
id handle of the administrators.

TODO !!!!!!!!!!!!!! no more handle -> componentInfo data

void com::cosylab::acs::maci::manager::ManagerImpl::alarmCleared String  faultMember  )  [inline]
 

Remember that alarms has been cleared.

void com::cosylab::acs::maci::manager::ManagerImpl::alarmRaised String  faultMember  )  [inline]
 

Remember that alarms has been raised.

void com::cosylab::acs::maci::manager::ManagerImpl::bind Context  remoteDirectory,
String  name,
String  type,
Object  object
[inline, private]
 

Bind object to remote directory.

Use INS syntax specified in the INS specification. In short, the syntax is that components are left-to-right slash ('/') separated and case-sensitive. The id and kind of each component are separated by the period character ('.').

Parameters:
remoteDirectory remote directory context to be used.
name name of the object, code non-null
object object to be binded

Todo:
temp. commented out

temp. commented out

void com::cosylab::acs::maci::manager::ManagerImpl::bind String  name,
String  type,
Object  object
[inline, private]
 

Bind object to root of remote directory.

Use INS syntax specified in the INS specification. In short, the syntax is that components are left-to-right slash ('/') separated and case-sensitive. The id and kind of each component are separated by the period character ('.').

Parameters:
name name of the object, code non-null
object object to be binded

void com::cosylab::acs::maci::manager::ManagerImpl::checkContainerShutdownState ContainerInfo  containerInfo  )  throws NoResourcesException [inline, private]
 

Checks if container's state (e.g. not in shutdown state).

Parameters:
containerInfo container's info to be checked.

void com::cosylab::acs::maci::manager::ManagerImpl::checkCURL URI  curl,
boolean  allowNonLocalDomains
throws AcsJBadParameterEx [inline, private]
 

Verifies URI if it is valid, in CURL format; also checks if it belongs to this domain. If URI is not valid, BadParametersException exception is thrown.

Parameters:
uri uri to be check to be a valid curl
allowNonLocalDomains allow non-local domains

void com::cosylab::acs::maci::manager::ManagerImpl::checkCURL URI  curl  )  throws AcsJBadParameterEx [inline, private]
 

Verifies URI if it is valid, in CURL format; also checks if it belongs to this domain. If URI is not valid, BadParametersException exception is thrown. Allows non-local domains.

Parameters:
uri uri to be check to be a valid curl

void com::cosylab::acs::maci::manager::ManagerImpl::checkCyclicDependency int  requestor,
String  requestedComponentName
throws AcsJCyclicDependencyDetectedEx [inline, private]
 

Check for cyclic dependency between components, if detected NoResourcesException exception is thrown.

Parameters:
requestor 
requestedComponentName 

void com::cosylab::acs::maci::manager::ManagerImpl::checkLoadBalancingStrategy  )  [inline, private]
 

Checks and registers load balancing strategy. Load balancing strategy is defined as Java JVM system property named NAME_LOAD_BALANCING_STRATEGY contaning class name of the LoadBalancingStrategy implementation.

void com::cosylab::acs::maci::manager::ManagerImpl::cleanupEmptyFContext Context  remoteDirectory,
String  name
[inline, private]
 

Removes empty ".F" context(s) (recirsive).

Parameters:
remoteDirectory directory root.
name name of the child object being just removed from the potential empty parent context.

ClientInfo com::cosylab::acs::maci::manager::ManagerImpl::clientLogin String  name,
AuthenticationData  reply,
Client  client,
long  timeStamp,
long  executionId
throws AcsJNoPermissionEx [inline, private]
 

Client specific login method.

Parameters:
name name of the client
reply reply to authenticate method
client client that is logging in
Returns:
ClientInfo client info. of newly logged client

void com::cosylab::acs::maci::manager::ManagerImpl::clientLogout int  id  )  [inline, private]
 

Client specific logout method

Parameters:
id handle of the client.

TODO !!!!!!!!!!!!!! no more handle -> componentInfo data

void com::cosylab::acs::maci::manager::ManagerImpl::conditionalShutdownContainer ContainerInfo  containerInfo  )  [inline, private]
 

Conditionally (if has no components and is not immortal container) shutdown container.

Parameters:
containerInfo container to shutdown.

void com::cosylab::acs::maci::manager::ManagerImpl::containerInternalStateMerge ContainerInfo  containerInfo,
boolean  recoverContainer
throws AcsJNoPermissionEx [inline, private]
 

Retrieve container's internal state and merge it with manager's. NOTE: this method should not be run in separate thread since states should be merged synchronously. Merge is split to two parts:

Container -> Manager

If container component handle is also allocated in manager state and components information match, then we have a perfect fit and no action is required. If they do not match, container is rejected. If container component handle is not allocated in the manager state and no component with same name is found in manager state, component information is transferred to the manager, owtherwise container is rejected.

NOTE: The second option allows components without owners to be activated.

NOTE: Container is rejected due to its state inconsistency which will probably cause problems in the future. Container has to be restarted.<br/> (A more sophisticated algorithm could give manager "the power to shape up" container state.)

NOTE: Container -> Manager has to work in the way transactions do, i.e. in case of rejection manager state should no be affected.

Manager -> Container

If recoverContainer is true, all components known to the manager to be activated on this particular container and listed as activated by the container will be marked as unavailable to be reactivated later by containerPostLoginActivation method. If recoverContainer is false, all there information will be discared (components removed from container component list, deallocated, and removed from their owners list).

Parameters:
containerInfo container info for which to perform merge, non-null.
recoverContainer if true manager state will be 'transferred' to container.

ClientInfo com::cosylab::acs::maci::manager::ManagerImpl::containerLogin String  name,
AuthenticationData  reply,
Container  container,
long  timeStamp,
long  executionId
throws AcsJNoPermissionEx [inline, private]
 

Container specific login method.

Parameters:
name name of the container, non-null.
reply reply to authenticate method, non-null.
container container that is logging in, non-null.
Returns:
ClientInfo client info. of newly logged container

void com::cosylab::acs::maci::manager::ManagerImpl::containerLogout int  id  )  [inline, private]
 

Container specific logout method

Parameters:
id handle of the container.

TODO !!!!!!!!!!!!!! no more handle -> componentInfo data

void com::cosylab::acs::maci::manager::ManagerImpl::containerPostLoginActivation final ContainerInfo  containerInfo,
boolean  recoverContainer
[inline, private]
 

Container post login activation, activate startup and unavailable components. NOTE: to be run in separate thread.

Parameters:
containerInfo container info for which to perform post login activation.
recoverContainer recovery mode flag.

String com::cosylab::acs::maci::manager::ManagerImpl::convertToHiearachical String  componentName  )  [inline, static, private]
 

Converts component name (e.g. "TOWER1/DOOR1") to hierachical name (e.g. "TOWER1.F/DOOR").

Parameters:
component name component name to be converted.
Returns:
hierarchical name.

DAOProxy com::cosylab::acs::maci::manager::ManagerImpl::createDAO String  entity  )  [inline, private]
 

Creates DAO (CDB access) for requested entity.

Parameters:
name name of the entity, non-null.
Returns:
DAOProxy DAO (CDB access) for requested entity, null on failure.

synchronized void com::cosylab::acs::maci::manager::ManagerImpl::destroyComponetsDAOProxy  )  [inline, private]
 

Destroys components DAO (CDB access).

synchronized void com::cosylab::acs::maci::manager::ManagerImpl::destroyContainersDAOProxy  )  [inline, private]
 

Destroys containers DAO (CDB access).

void com::cosylab::acs::maci::manager::ManagerImpl::destroyDAO DAOProxy  dao  )  [inline, private]
 

Destroys DAO (CDB access).

Parameters:
dao DAO to be destroyed.

synchronized void com::cosylab::acs::maci::manager::ManagerImpl::destroyManagerDAOProxy  )  [inline, private]
 

Destroys Manager DAO (CDB access).

ArrayList com::cosylab::acs::maci::manager::ManagerImpl::doCycleCheck int  requestor,
int  requested
[inline, private]
 

Check for cyclic dependency between components, if detected path is returned.

Parameters:
requestor handle of requestor component
requested handle of requested component
Returns:
if cycle is detected then path is returned, otherwise null

String com::cosylab::acs::maci::manager::ManagerImpl::dottedToHierarchical String  dottedName  )  [inline, static, private]
 

Converts dotted name (e.g. "te1.hq.eso.org") to hierachical name (e.g. "org.D/eso.D/hq.D/te1.D").

Parameters:
dottedName dotted name to be converted.
Returns:
hierarchical name.

Serializable com::cosylab::acs::maci::manager::ManagerImpl::executeCommand Command  command  )  [inline, private]
 

!!throws Exception

String com::cosylab::acs::maci::manager::ManagerImpl::extractName URI  curl  )  [inline, private]
 

Extract component name from the URI. Only name is returned for local domain, full CURL string for non-local domains.

Parameters:
curl curl from which to extract name.

void com::cosylab::acs::maci::manager::ManagerImpl::finalizeFederation  )  [inline, private]
 

Finalize manager federation.

int com::cosylab::acs::maci::manager::ManagerImpl::forceReleaseComponent int  id,
URI  curl
throws AcsJNoPermissionEx, AcsJBadParameterEx [inline]
 

See also:
com.cosylab.acs.maci.Manager::forceReleaseComponent(int, URI)

Implements com::cosylab::acs::maci::Manager.

synchronized long com::cosylab::acs::maci::manager::ManagerImpl::generateExecutionId  )  [inline, protected]
 

HashSet com::cosylab::acs::maci::manager::ManagerImpl::getActiveAlarms  )  [inline]
 

Returns:
the activeAlarms

HandleDataStore com::cosylab::acs::maci::manager::ManagerImpl::getAdministrators  )  [inline]
 

Returns the administrators.

Returns:
HandleDataStore

ClientInfo [] com::cosylab::acs::maci::manager::ManagerImpl::getAdministrators int  excludeHandle  )  [inline, private]
 

Returns array of currently logged administrators.

Parameters:
excludeHandle handle of administrator not to be included in the array, can be 0.
Returns:
ClientInfo[] array of currently logged administrators

ClientInfo com::cosylab::acs::maci::manager::ManagerImpl::getClientInfo int  id  )  [inline]
 

Get client info. for specified id of Client or Administrator.

Parameters:
id handle of the client whose info. should be returned
returns requested info, null if client with requested handle does not exits

ClientInfo [] com::cosylab::acs::maci::manager::ManagerImpl::getClientInfo  )  [inline, private]
 

Returns array of currently logged clients.

Returns:
ClientInfo[] array of currently logged clients

ClientInfo [] com::cosylab::acs::maci::manager::ManagerImpl::getClientInfo int  id,
int[]  handles,
String  name_wc
throws AcsJNoPermissionEx [inline]
 

See also:
com.cosylab.acs.maci.Manager::getClientInfo(int, int[], String)

Implements com::cosylab::acs::maci::Manager.

HandleDataStore com::cosylab::acs::maci::manager::ManagerImpl::getClients  )  [inline]
 

Returns the clients.

Returns:
HandleDataStore

ClientInfo [] com::cosylab::acs::maci::manager::ManagerImpl::getClients int  excludeHandle,
int[]  handles
[inline, private]
 

Get client info. for specified handles of Client or Administrator. For Component handles component's Container is returned.

Parameters:
excludeHandle handle of client not to be included in the array, can be 0.
handles handles of the clients whose info. should be returned, non-null.
returns requested infos, null if none

ComponentInfo com::cosylab::acs::maci::manager::ManagerImpl::getCollocatedComponent int  id,
ComponentSpec  componentSpec,
boolean  markAsDefault,
URI  targetComponentURI
throws AcsJCannotGetComponentEx, AcsJNoPermissionEx, AcsJIncompleteComponentSpecEx, AcsJInvalidComponentSpecEx, AcsJComponentSpecIncompatibleWithActiveComponentEx [inline]
 

See also:
com.cosylab.acs.maci.Manager::getCollocatedComponent(int, com.cosylab.acs.maci.ComponentSpec, boolean, URI)
Todo:
MF not supported

Todo:
temporary quick implementation (does not look in the CDB if component is not activated)

Implements com::cosylab::acs::maci::Manager.

Component com::cosylab::acs::maci::manager::ManagerImpl::getComponent int  id,
URI  curl,
boolean  activate,
StatusHolder  status,
boolean  allowServices
throws AcsJCannotGetComponentEx, AcsJNoPermissionEx [inline, private]
 

See also:
getComponent

Todo:
GCH 2006.09.25 This last case should never happen, because there should be and exception thrown instead.

Component com::cosylab::acs::maci::manager::ManagerImpl::getComponent int  id,
URI  curl,
boolean  activate,
StatusHolder  status
throws AcsJCannotGetComponentEx, AcsJNoPermissionEx [inline]
 

See also:
com.cosylab.acs.maci.Manager::getComponent(int, URI, boolean, StatusHolder)

Implements com::cosylab::acs::maci::Manager.

ComponentInfo com::cosylab::acs::maci::manager::ManagerImpl::getComponentInfo int  id  )  [inline]
 

Get component info. for specified id of Component.

Parameters:
id handle of the component whose info. should be returned
returns requested info, null if component with requested handle does not exits

ComponentInfo [] com::cosylab::acs::maci::manager::ManagerImpl::getComponentInfo int  id,
int[]  handles,
String  name_wc,
String  type_wc,
boolean  activeOnly
throws AcsJNoPermissionEx [inline]
 

See also:
com.cosylab.acs.maci.Manager::getComponentInfo(int, int[], String, String, boolean)

here to check if CDB is available

name.equals(ComponentSpec.COMPSPEC_ANY) &&

Implements com::cosylab::acs::maci::Manager.

Component com::cosylab::acs::maci::manager::ManagerImpl::getComponentNonSticky int  id,
URI  curl
throws AcsJCannotGetComponentEx, AcsJNoPermissionEx [inline]
 

See also:
com.cosylab.acs.maci.Manager::getComponentNonSticky(int id, URI curl)

Implements com::cosylab::acs::maci::Manager.

HandleDataStore com::cosylab::acs::maci::manager::ManagerImpl::getComponents  )  [inline]
 

Returns the components.

Returns:
HandleDataStore

synchronized DAOProxy com::cosylab::acs::maci::manager::ManagerImpl::getComponentsDAOProxy  )  [inline, private]
 

Returns, if necessary also creates, components DAO (CDB access).

Returns:
DAOProxy components DAO (CDB access), otherwise null

String [] com::cosylab::acs::maci::manager::ManagerImpl::getComponentsList  )  [inline, private]
 

Get list of all components.

Returns:
list of all components.

ContainerInfo com::cosylab::acs::maci::manager::ManagerImpl::getContainerInfo String  name  )  [inline, private]
 

Get container info. for specified name of Container.

Parameters:
name name of the container whose info. should be returned, non-null
returns requested info, null if container with requested handle does not exits

ContainerInfo com::cosylab::acs::maci::manager::ManagerImpl::getContainerInfo int  id  )  [inline, private]
 

Get container info. for specified id of Container.

Parameters:
id handle of the container whose info. should be returned
returns requested info, null if container with requested handle does not exits

ContainerInfo [] com::cosylab::acs::maci::manager::ManagerImpl::getContainerInfo int  id,
int[]  handles,
String  name_wc
throws AcsJNoPermissionEx [inline]
 

See also:
com.cosylab.acs.maci.Manager::getContainerInfo(int, int[], String)

Implements com::cosylab::acs::maci::Manager.

HandleDataStore com::cosylab::acs::maci::manager::ManagerImpl::getContainers  )  [inline]
 

Returns the containers.

Returns:
HandleDataStore

synchronized DAOProxy com::cosylab::acs::maci::manager::ManagerImpl::getContainersDAOProxy  )  [inline, private]
 

Returns, if necessary also creates, containers DAO (CDB access).

Returns:
DAOProxy containers DAO (CDB access), otherwise null

ContainerInfo [] com::cosylab::acs::maci::manager::ManagerImpl::getContainersInfo  )  [inline, private]
 

Returns array of currently logged containers.

Returns:
ContainerInfo[] array of currently logged containers

ComponentInfo com::cosylab::acs::maci::manager::ManagerImpl::getDefaultComponent int  id,
String  type
throws AcsJNoPermissionEx, NoDefaultComponentException [inline]
 

See also:
com.cosylab.acs.maci.Manager::getDefaultComponent(int, java.lang.String)

Implements com::cosylab::acs::maci::Manager.

Map com::cosylab::acs::maci::manager::ManagerImpl::getDefaultComponents  )  [inline]
 

Returns the defaultComponents.

Returns:
Map

String com::cosylab::acs::maci::manager::ManagerImpl::getDomain  )  [inline]
 

See also:
com.cosylab.acs.maci.Manager::getDomain()

Implements com::cosylab::acs::maci::Manager.

ComponentInfo com::cosylab::acs::maci::manager::ManagerImpl::getDynamicComponent int  id,
ComponentSpec  componentSpec,
boolean  markAsDefault
throws AcsJCannotGetComponentEx, AcsJNoPermissionEx, AcsJIncompleteComponentSpecEx, AcsJInvalidComponentSpecEx, AcsJComponentSpecIncompatibleWithActiveComponentEx [inline]
 

See also:
com.cosylab.acs.maci.Manager::getDynamicComponent(int, com.cosylab.acs.maci.ComponentSpec, boolean)

Todo:
Is it OK to get here? Always? This is a place where we have to check carefully.

Implements com::cosylab::acs::maci::Manager.

ComponentInfo [] com::cosylab::acs::maci::manager::ManagerImpl::getDynamicComponents int  id,
ComponentSpec[]  components
throws AcsJNoPermissionEx [inline]
 

See also:
com.cosylab.acs.maci.Manager#getDynamicComponents(int, com.cosylab.acs.maci.ComponentSpec[])

Todo:
this method still returns null in case of errors and only throws AcsJNoPermissions or a couple of runtime exceptions. Needs to be refactored or, probably better, deprecated.

int com::cosylab::acs::maci::manager::ManagerImpl::getHandle  )  [inline]
 

Returns the handle of the Manager.

Returns:
int handle of the Manager.

long com::cosylab::acs::maci::manager::ManagerImpl::getLockTimeout  )  [inline]
 

Returns lock timeout (deadlock detection time) in ms.

Returns:
lock timeout (deadlock detection time) in ms

Object com::cosylab::acs::maci::manager::ManagerImpl::getManagerComponentReference  )  [inline]
 

Returns the managerComponentReference.

Returns:
Object

synchronized DAOProxy com::cosylab::acs::maci::manager::ManagerImpl::getManagerDAOProxy  )  [inline, private]
 

Returns, if necessary also creates, Manager DAO (CDB access).

Returns:
DAOProxy Manager DAO (CDB access), otherwise null

synchronized Manager com::cosylab::acs::maci::manager::ManagerImpl::getManagerForDomain String  domainName  )  [inline, private]
 

Get manager for given domain.

Parameters:
domainName domain name.
Returns:
manager for given domain, null if not found.

Todo:
CORBA specific

Context com::cosylab::acs::maci::manager::ManagerImpl::getRemoteDirectory  )  [inline]
 

Returns the remoteDirectory.

Returns:
Context

Object com::cosylab::acs::maci::manager::ManagerImpl::getRemoteDirectoryComponentReference  )  [inline]
 

Returns the remoteDirectoryComponentReference.

Returns:
Object

String com::cosylab::acs::maci::manager::ManagerImpl::getRequestorName int  id  )  [inline, private]
 

Returns human-readable and meaningful name of handle.

Parameters:
id handle to stringifys
Returns:
human-readable and meaningful name of handle.

Component com::cosylab::acs::maci::manager::ManagerImpl::getService int  id,
URI  curl,
boolean  activate,
StatusHolder  status
throws AcsJCannotGetComponentEx, AcsJNoPermissionEx [inline]
 

See also:
com.cosylab.acs.maci.Manager::getService(int, java.net.URI, boolean, StatusHolder)

Implements com::cosylab::acs::maci::Manager.

ManagerShutdown com::cosylab::acs::maci::manager::ManagerImpl::getShutdownImplementation  )  [inline]
 

Returns the shutdownImplementation.

Returns:
ManagerShutdown

Map com::cosylab::acs::maci::manager::ManagerImpl::getUnavailableComponents  )  [inline]
 

Returns the unavailableComponents.

Returns:
Map

boolean com::cosylab::acs::maci::manager::ManagerImpl::hasActiveAlarm String  faultMember  )  [inline]
 

Flag if alarm is active.

boolean com::cosylab::acs::maci::manager::ManagerImpl::hasCDBEntry ComponentInfo  componentInfo  )  [inline, private]
 

Search for CDB entry of given component.

Parameters:
componentInfo component info of CDB entry to be found, non-null.
Returns:
if CDB entry of has been found true, or if it does not exist or there is no CDB available false.

void com::cosylab::acs::maci::manager::ManagerImpl::initialize Prevayler  prevayler,
CDBAccess  cdbAccess,
Context  context,
Logger  logger,
ManagerContainerServices  managerContainerServices
[inline]
 

Initializes Manager.

Parameters:
prevayler implementation of prevayler system
context remote directory implementation

void com::cosylab::acs::maci::manager::ManagerImpl::initializeDefaultConfiguration  )  [inline, private]
 

Initialize manager default configuration.

void com::cosylab::acs::maci::manager::ManagerImpl::initializeFederation Hashtable  federationDirectoryProperties  )  throws CoreException [inline]
 

Initialize manager federation.

void com::cosylab::acs::maci::manager::ManagerImpl::initializePingTasks  )  [inline, private]
 

Initialized (registers) all ping tasks (to completely recover).

void com::cosylab::acs::maci::manager::ManagerImpl::internalDeactivateComponent String  name  )  [inline, private]
 

Internal method for deactivating components.

Parameters:
name name of the component to be released.

void com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncDeactivateComponent ComponentInfo  componentInfo  )  [inline, private]
 

Deactivate component, issue deactivate reeust to container (or other manager).

Parameters:
componentInfo info about component to be deactivated.

int com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncReleaseComponent int  owner,
int  h,
boolean  force
throws AcsJNoPermissionEx [inline, private]
 

Internal method for releasing components.

Parameters:
owner owner of the component.
h handle of the component to be released.
force force deactivate, if still has owners then component will be made unavailable.
Returns:
Number of clients that are still using the component after the operation completed.

TODO !!!!!!!!!!!!!! no more handle -> componentInfo data

ComponentInfo com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncRequestComponent int  requestor,
String  name,
String  type,
String  code,
String  containerName,
int  keepAliveTime,
StatusHolder  status,
boolean  activate
throws AcsJCannotGetComponentEx, AcsJComponentSpecIncompatibleWithActiveComponentEx [inline, private]
 

Internal method for requesting components (non sync).

Parameters:
requestor requestor of the component.
name name of component to be requested, non-null.
type type of component to be requested; if null CDB will be queried.
code code of component to be requested; if null CDB will be queried.
containerName container name of component to be requested; if null CDB will be queried.
status returned completion status of the request.
activate true if component has to be activated
Returns:
componentInfo ComponentInfo of requested component.

MF tmp (handle)

!!! ACID

Component com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncRestartComponent int  owner,
int  h
throws AcsJNoPermissionEx [inline, private]
 

Internal method for restarting components.

Parameters:
owner owner of the component.
h handle of the component to be restarting.
Returns:
Newly restarted component, null if failed.

int com::cosylab::acs::maci::manager::ManagerImpl::internalReleaseComponent int  owner,
int  h,
boolean  force
throws AcsJNoPermissionEx, AcsJBadParameterEx [inline, private]
 

Internal method for releasing components.

Parameters:
owner owner of the component.
h handle of the component to be released.
force force deactivate, if still has owners then component will be made unavailable.
Returns:
Number of clients that are still using the component after the operation completed.

int com::cosylab::acs::maci::manager::ManagerImpl::internalReleaseComponent int  owner,
URI  curl,
boolean  force
throws AcsJNoPermissionEx, AcsJBadParameterEx [inline, private]
 

Internal method for releasing components.

Parameters:
owner owner of the component, if manager's own handle then deactivation will be forced
curl CURL of the component to be released.
force force deactivate, if still has owners then component will be made unavailable.
Returns:
Number of clients that are still using the component after the operation completed.

ComponentInfo com::cosylab::acs::maci::manager::ManagerImpl::internalRequestComponent int  requestor,
String  name,
String  type,
String  code,
String  containerName,
int  keepAliveTime,
StatusHolder  status,
boolean  activate
throws AcsJCannotGetComponentEx, AcsJSyncLockFailedEx, AcsJComponentSpecIncompatibleWithActiveComponentEx [inline, private]
 

Internal method for requesting components.

Parameters:
requestor requestor of the component.
name name of component to be requested, non-null.
type type of component to be requested; if null CDB will be queried.
code code of component to be requested; if null CDB will be queried.
containerName container name of component to be requested; if null CDB will be queried.
status returned completion status of the request.
activate true if component has to be activated
Returns:
componentInfo ComponentInfo of requested component.

Component com::cosylab::acs::maci::manager::ManagerImpl::internalRequestComponent int  requestor,
URI  curl,
StatusHolder  status,
boolean  activate
throws AcsJCannotGetComponentEx [inline, private]
 

Internal method for requesting components.

Parameters:
requestor requestor of the component.
curl curl of the component to be requested.
status status of the component.
activate true if component has to be activated
Returns:
component requested component.

Component com::cosylab::acs::maci::manager::ManagerImpl::internalRequestComponent int  requestor,
URI  curl,
StatusHolder  status
throws AcsJCannotGetComponentEx [inline, private]
 

Internal method for requesting components.

Parameters:
requestor requestor of the component.
curl curl of the component to be requested.
status status of the component.
Returns:
component retuested component.

ComponentInfo com::cosylab::acs::maci::manager::ManagerImpl::internalRequestDefaultComponent int  requestor,
String  type
throws NoDefaultComponentException [inline, private]
 

Internal method for requesting default components.

Parameters:
requestor requestor of the component.
typr type of the component
Returns:
componentInfo ComponentInfo of requested default component.

ComponentInfo com::cosylab::acs::maci::manager::ManagerImpl::internalRequestDynamicComponent int  requestor,
ComponentSpec  componentSpec
throws AcsJCannotGetComponentEx, AcsJSyncLockFailedEx, AcsJNoPermissionEx, AcsJIncompleteComponentSpecEx, AcsJInvalidComponentSpecEx, AcsJComponentSpecIncompatibleWithActiveComponentEx [inline, private]
 

Internal method for requesting dynamic components.

Resolution: component_name and component_type can be considered as "determinator" fields, they play important role in search algorithm. component_code and container_name can be considered as "override" fields, they only help to find closest match. Rule: unspecified component_name case implies that a new component will be activated. Search points (8,4,2,1): component_name, component_type, component_code, container_name.

  name | type | search criteria
 -----------------------------
    *  |   *  | throw IncompleteComponentSpecException
    X  |   *  | (equals, wildcard)
    *  |   X  | (equals, equals) w/ name generation
    X  |   X  | (wildcard, equals) - overriding type is not allowed

 
'name' can be also something like "ANT1/*" (ends with) and is threated just like "*".

Parameters:
requestor requestor of the component.
componentSpec requested component ComponentSpec
Returns:
componentInfo ComponentInfo of requested dynamic component.

Todo:
not perfect

Component com::cosylab::acs::maci::manager::ManagerImpl::internalRestartComponent int  owner,
int  h
throws AcsJNoPermissionEx [inline, private]
 

Internal method for restarting components.

Parameters:
owner owner of the component.
h handle of the component to be restarted.
Returns:
Newly restarted component, null if failed.

Component com::cosylab::acs::maci::manager::ManagerImpl::internalRestartComponent int  owner,
URI  curl
throws AcsJNoPermissionEx [inline, private]
 

Internal method for restarting components.

Parameters:
owner owner of the component.
curl CURL of the component to be restarted.
Returns:
Newly restarted component, null if failed.

boolean com::cosylab::acs::maci::manager::ManagerImpl::isLocalDomainCURL URI  curl  )  [inline, private]
 

Check if CURL belongs to local domain.

Parameters:
curl CURL to be checked.
Returns:
true if CURL belongs to local domain, false otherwise.

boolean com::cosylab::acs::maci::manager::ManagerImpl::isServiceComponent String  name  )  [inline]
 

Checks if component name is a service component name, list of names is defined in the CDB.

Parameters:
name name to be checked, non-null
Returns:
true if component name is service component name, false otherwise

boolean com::cosylab::acs::maci::manager::ManagerImpl::isShuttingDown  )  [inline]
 

Return shutdown status of the Manager.

Returns:
shutdown status of the Manager

ClientInfo com::cosylab::acs::maci::manager::ManagerImpl::login Client  reference  )  throws AcsJNoPermissionEx [inline]
 

See also:
com.cosylab.acs.maci.Manager::login(Client)

Implements com::cosylab::acs::maci::Manager.

void com::cosylab::acs::maci::manager::ManagerImpl::logout int  id  )  throws AcsJNoPermissionEx [inline]
 

See also:
com.cosylab.acs.maci.Manager::logout(int)

Implements com::cosylab::acs::maci::Manager.

Object com::cosylab::acs::maci::manager::ManagerImpl::lookup Context  remoteDirectory,
String  name,
String  type
[inline, private]
 

Lookups for an object in remote directory.

Use INS syntax specified in the INS specification. In short, the syntax is that components are left-to-right slash ('/') separated and case-sensitive. The id and kind of each component are separated by the period character ('.').

Parameters:
remoteDirectory remote directory context to be used.
name name of the object, code non-null
type type of the object
Returns:
object object found in the remote directory, null if nout found

Object com::cosylab::acs::maci::manager::ManagerImpl::lookup String  name,
String  type
[inline, private]
 

Lookups for an object in root of the remote directory.

Use INS syntax specified in the INS specification. In short, the syntax is that components are left-to-right slash ('/') separated and case-sensitive. The id and kind of each component are separated by the period character ('.').

Parameters:
name name of the object, code non-null
type type of the object
Returns:
object object found in the remote directory, null if nout found

void com::cosylab::acs::maci::manager::ManagerImpl::makeComponentImmortal int  id,
URI  curl,
boolean  immortalState
throws AcsJCannotGetComponentEx, AcsJNoPermissionEx, AcsJBadParameterEx [inline]
 

See also:
com.cosylab.acs.maci.Manager::makeComponentImmortal(int, java.net.URI, boolean)

Implements com::cosylab::acs::maci::Manager.

void com::cosylab::acs::maci::manager::ManagerImpl::makeUnavailable ComponentInfo  componentInfo  )  [inline, private]
 

Make Component unavailable.

Parameters:
componentInfo component to be made unavailable.

void com::cosylab::acs::maci::manager::ManagerImpl::notifyClientDisconnectShutdown  )  [inline, private]
 

Notifies clients to disconnect or shutdown.

Task thats invokes Client::disconnect method.

void com::cosylab::acs::maci::manager::ManagerImpl::notifyClientLogin final ClientInfo  clientInfo,
final long  timeStamp,
final long  executionId
[inline, private]
 

Notifies administrators about newly logged client.

Parameters:
clientInfo newly logged client, non-null

Task thats invokes Administrator::clientLoggedIn method.

void com::cosylab::acs::maci::manager::ManagerImpl::notifyClientLogout final ClientInfo  clientInfo,
final long  timeStamp
[inline, private]
 

Notifies administrators about client logging out.

Parameters:
client client logging out, non-null

Task thats invokes Administrator::clientLoggedOut method.

void com::cosylab::acs::maci::manager::ManagerImpl::notifyComponentActivated final ComponentInfo  componentInfo,
final long  timeStamp,
final long  executionId
[inline, private]
 

Notifies administrators about Component activation.

Parameters:
componentInfo activated component info, non-null

Task thats invokes Administrator::component_activated method.

void com::cosylab::acs::maci::manager::ManagerImpl::notifyComponentAvailable int  excludeClient,
int[]  clientHandles,
ComponentInfo[]  info
[inline, private]
 

Notifies administrators about component request.

Parameters:
excludeClient client not to be informed, 0 if none
clientHandles array of client handles to be informed, non-null
info component infos to be sent to the clients, non-null

Task thats invokes Client::components_available method.

void com::cosylab::acs::maci::manager::ManagerImpl::notifyComponentDeactivated final int  handle,
final long  timeStamp
[inline, private]
 

Notifies administrators about Component deactivation.

Parameters:
component deactivated component handle, non-0

Task thats invokes Administrator::component_deactivated method.

void com::cosylab::acs::maci::manager::ManagerImpl::notifyComponentReleased int[]  requestors,
int[]  components,
final long  timeStamp
[inline, private]
 

Notifies administrators about Component request.

Parameters:
requestors array of clients requesting the Component, non-null
components array of requested the components, non-null

Task thats invokes Administrator::components_requested method.

void com::cosylab::acs::maci::manager::ManagerImpl::notifyComponentRequested int[]  requestors,
int[]  components,
final long  timeStamp
[inline, private]
 

Notifies administrators about Component request.

Parameters:
requestors array of clients requesting the Component, non-null
components array of requested the components, non-null

Task thats invokes Administrator::components_requested method.

void com::cosylab::acs::maci::manager::ManagerImpl::notifyComponentUnavailable int  excludeClient,
int[]  clientHandles,
String[]  names
[inline, private]
 

Notifies administrators about Component request.

Parameters:
excludeClient client not to be informed, 0 if none
clientHandles array of client handles to be informed, non-null
names component names to be sent to the clients, non-null

Task thats invokes Client::components_unavailable method.

void com::cosylab::acs::maci::manager::ManagerImpl::notifyContainerDisconnectShutdown int  code  )  [inline, private]
 

Notifies containers to disconnect or shutdown.

Parameters:
code code to be sent to container, if 0 disconnect method will be called.

Task thats invokes Container::shutdown method.

Task thats invokes Container::shutdown method.

void com::cosylab::acs::maci::manager::ManagerImpl::notifyContainerLogin final ContainerInfo  containerInfo,
final long  timeStamp,
final long  executionId
[inline, private]
 

Notifies administrators about newly logged container.

Parameters:
containerInfo newly logged container, non-null

Task thats invokes Administrator::containerLoggedIn method.

void com::cosylab::acs::maci::manager::ManagerImpl::notifyContainerLogout final ContainerInfo  containerInfo,
final long  timeStamp
[inline, private]
 

Notifies administrators about container logging out.

Parameters:
containerInfo container logging out, non-null

Task thats invokes Administrator::containerLoggedIn method.

void com::cosylab::acs::maci::manager::ManagerImpl::notifyContainerShutdownOrder ContainerInfo  containerInfo,
int[]  handles
[inline, private]
 

Informs containers abouts its component shutdown order.

Parameters:
containerInfo container to inform
handles ordered list of component handles

Task thats invokes Container::shutdown method.

double com::cosylab::acs::maci::manager::ManagerImpl::readDoubleCharacteristics DAOProxy  dao,
String  path,
double  defaultValue,
boolean  silent
[inline, private]
 

Reads DAO (CDB access) of double type.

Parameters:
path path to be read non-null.
dao DAO on which to perform read request.
silent do not complain, if characteristics not found.
Returns:
double value read, 0.0 on failure.

int com::cosylab::acs::maci::manager::ManagerImpl::readLongCharacteristics DAOProxy  dao,
String  path,
int  defaultValue,
boolean  silent
[inline, private]
 

Reads DAO (CDB access) of long type.

Parameters:
path path to be read non-null.
dao DAO on which to perform read request.
silent do not complain, if characteristics not found.
Returns:
int value read, 0 on failure.

void com::cosylab::acs::maci::manager::ManagerImpl::readManagerConfiguration  )  [inline, private]
 

Read manager configuration.

String com::cosylab::acs::maci::manager::ManagerImpl::readStringCharacteristics DAOProxy  dao,
String  path,
boolean  silent
[inline, private]
 

Reads DAO (CDB access) of string type.

Parameters:
path path to be read non-null.
dao DAO on which to perform read request.
silent do not complain, if characteristics not found
Returns:
String value read, null on failure

String com::cosylab::acs::maci::manager::ManagerImpl::readStringCharacteristics DAOProxy  dao,
String  path
[inline, private]
 

Reads DAO (CDB access) of string type (uses getStringCharctareistics method).

Parameters:
path path to be read non-null.
dao DAO on which to perform read request.
Returns:
String value read, null on failure

void com::cosylab::acs::maci::manager::ManagerImpl::rebind Context  remoteDirectory,
String  name,
String  type,
Object  object
[inline, private]
 

Rebind object to remote directory.

Use INS syntax specified in the INS specification. In short, the syntax is that components are left-to-right slash ('/') separated and case-sensitive. The id and kind of each component are separated by the period character ('.'). NOTE: Does not support hierarchical names.

Parameters:
remoteDirectory remote directory context to be used.
name name of the object, code non-null
type type of the object
object object to be binded

String [] com::cosylab::acs::maci::manager::ManagerImpl::refreshComponentsList DAOProxy  dc  )  [inline, private]
 

Searches dao for all potential (nodes containing Name attribute) ComponentInfo nodes.

Parameters:
dc dao to be searched.
Returns:
list of all potential ComponentInfo nodes.

Todo:
this could be done better (to check if all attributes exist)

int com::cosylab::acs::maci::manager::ManagerImpl::registerComponent int  id,
URI  curl,
String  type,
Component  component
throws AcsJNoPermissionEx, AcsJBadParameterEx [inline]
 

See also:
com.cosylab.acs.maci.Manager::registerComponent(int, URI, String, Component)

Implements com::cosylab::acs::maci::Manager.

int com::cosylab::acs::maci::manager::ManagerImpl::releaseComponent int  id,
URI  curl
throws AcsJNoPermissionEx, AcsJBadParameterEx [inline]
 

See also:
com.cosylab.acs.maci.Manager::releaseComponent(int, URI)

Implements com::cosylab::acs::maci::Manager.

void com::cosylab::acs::maci::manager::ManagerImpl::releaseComponents ComponentInfo[]  infos  )  throws AcsJNoPermissionEx [inline, private]
 

Release components (using manager handle)

Parameters:
infos components to release

void com::cosylab::acs::maci::manager::ManagerImpl::releaseComponents int  id,
URI[]  curls
throws AcsJNoPermissionEx [inline]
 

See also:
com.cosylab.acs.maci.Manager#releaseComponents(int, URI[])

void com::cosylab::acs::maci::manager::ManagerImpl::releaseSynchronizationObject String  name,
boolean  release
[inline, private]
 

Release synchronization lock for named object.

Parameters:
name name of the object whose lock to release.
release set to false if there is no need to call release on synchronization lock.

void com::cosylab::acs::maci::manager::ManagerImpl::releaseSynchronizationObject String  name  )  [inline, private]
 

Release synchronization lock for named object.

Parameters:
name name of the object whose lock to release.

void com::cosylab::acs::maci::manager::ManagerImpl::removeComponentOwner int  componentHandle,
int  owner
[inline, private]
 

Remove component handle from the owners list.

Parameters:
componentHandle component handle to be removed from the owners list.
owner owner whom to remove the ownership.

void com::cosylab::acs::maci::manager::ManagerImpl::reportException Throwable  th  )  [inline, private]
 

Component com::cosylab::acs::maci::manager::ManagerImpl::restartComponent int  id,
URI  curl
throws AcsJNoPermissionEx, AcsJBadParameterEx [inline]
 

See also:
com.cosylab.acs.maci.Manager::restartComponent(int, URI)

Implements com::cosylab::acs::maci::Manager.

String [] com::cosylab::acs::maci::manager::ManagerImpl::searchDynamicComponent String[]  fieldNames,
String[]  requiredValues,
boolean[]  equalityRequired,
int[]  equalityPoints,
IntHolder  keepAliveTimeHolder
[inline, private]
 

Searches for the best match in Components entry in the CDB.

Parameters:
fieldNames array of fields names to be searched.
requiredValues required values of fields, if ComponentSpec.COMPSPEC_ANY any value is accepted.
equalityRequired true if requiredValues[i] and fieldNames[i] value values must match, i.e. String.equals(String) is used.
equalityPoints array of points to be given to each field whose value is equal to the CDB value, used to determine best match.
Returns:
best match found in the CDB, null on failure or if not found.

Todo:
here to check if CDB is available

not nice way, but necessary to have hierarchical names

void com::cosylab::acs::maci::manager::ManagerImpl::securityCheck int  id,
int  requiredRights
throws AcsJNoPermissionEx [inline, private]
 

Performs security check on given handle and if check if owner has rights permissions granted.

Validating means checking key part (KEY_MASK) of the handle.

Parameters:
id handle to be checked.
rights checks if owner of the handle has this permissions granted, can be 0.
Exceptions:
AcsJNoPermissionEx thrown if handle is not valid or handle owner has not enough permissions

void com::cosylab::acs::maci::manager::ManagerImpl::sendMessage Client  client,
String  message,
MessageType  messageType,
short  messageID
[inline, private]
 

Sends an message to the client.

Parameters:
client client to receive the message, non-null
message message to be sent, non-null
messageType type of the message, non-null
messageID identifier for this message

Task thats invokes Client::message method.

void com::cosylab::acs::maci::manager::ManagerImpl::sendMessage Client  client,
String  message,
MessageType  messageType
[inline, private]
 

Sends an message to the client.

Parameters:
client client to receive the message, non-null
message message to be sent, non-null
messageType type of the message, non-null

void com::cosylab::acs::maci::manager::ManagerImpl::setCDBAccess CDBAccess  cdbAccess  )  [inline]
 

Sets CDB access.

Parameters:
cdbAccess cdbAccess to set.

void com::cosylab::acs::maci::manager::ManagerImpl::setDomain String  domain  )  [inline]
 

Set name of the domain, which this manager will handle.

Parameters:
domain name of the domain, which this manager will handle, non-null
See also:
getDomain

void com::cosylab::acs::maci::manager::ManagerImpl::setLockTimeout long  l  )  [inline]
 

Sets lock timeout (deadlock detection time) in ms.

Parameters:
l lock timeout (deadlock detection time) in ms

void com::cosylab::acs::maci::manager::ManagerImpl::setManagerComponentReference Object  managerComponentReference  )  [inline]
 

Sets the managerComponentReference.

Parameters:
managerComponentReference The managerComponentReference to set

void com::cosylab::acs::maci::manager::ManagerImpl::setRemoteDirectory Context  remoteDirectory  )  [inline]
 

Sets the remoteDirectory.

Parameters:
remoteDirectory The remoteDirectory to set

void com::cosylab::acs::maci::manager::ManagerImpl::setRemoteDirectoryComponentReference Object  remoteDirectoryComponentReference  )  [inline]
 

Sets the remoteDirectoryComponentReference.

Parameters:
remoteDirectoryComponentReference The remoteDirectoryComponentReference to set

void com::cosylab::acs::maci::manager::ManagerImpl::setShutdownImplementation ManagerShutdown  shutdownImplementation  )  [inline]
 

Sets the shutdownImplementation.

Parameters:
shutdownImplementation The shutdownImplementation to set

void com::cosylab::acs::maci::manager::ManagerImpl::setTransport Transport  transport  )  [inline]
 

Set the transport.

Parameters:
transport 

void com::cosylab::acs::maci::manager::ManagerImpl::shutdown int  id,
int  containers
throws AcsJNoPermissionEx [inline]
 

See also:
com.cosylab.acs.maci.Manager::shutdown(int, int)

Implements com::cosylab::acs::maci::Manager.

void com::cosylab::acs::maci::manager::ManagerImpl::shutdownContainer int  id,
String  containerName,
int  action
throws AcsJNoPermissionEx [inline]
 

See also:
com.cosylab.acs.maci.Manager::shutdownContainer(int, java.lang.String, int)

Implements com::cosylab::acs::maci::Manager.

ContainerInfo com::cosylab::acs::maci::manager::ManagerImpl::startUpContainer String  containerName  )  [inline, private]
 

Start-up container (if it has a deploy info).

Parameters:
containerName name of the container to start up.
Returns:
container info of container, null if failed to start.

String com::cosylab::acs::maci::manager::ManagerImpl::toString  )  [inline]
 

Returns a single-line rendition of this instance into text.

Returns:
internal state of this instance

void com::cosylab::acs::maci::manager::ManagerImpl::unbind Context  remoteDirectory,
String  name,
String  type
[inline, private]
 

Unbind object to remote directory.

Use INS syntax specified in the INS specification. In short, the syntax is that components are left-to-right slash ('/') separated and case-sensitive. The id and kind of each component are separated by the period character ('.').

Parameters:
remoteDirectory remote directory context to be used.
name name of the object, code non-null
type type of the object

void com::cosylab::acs::maci::manager::ManagerImpl::unbind String  name,
String  type
[inline, private]
 

Unbind object to remote directory.

Use INS syntax specified in the INS specification. In short, the syntax is that components are left-to-right slash ('/') separated and case-sensitive. The id and kind of each component are separated by the period character ('.').

Parameters:
name name of the object, code non-null
type type of the object

void com::cosylab::acs::maci::manager::ManagerImpl::unregisterComponent int  id,
int  h
throws AcsJNoPermissionEx, AcsJBadParameterEx [inline]
 

See also:
com.cosylab.acs.maci.Manager::unregisterComponent(int, int)

Implements com::cosylab::acs::maci::Manager.


Member Data Documentation

transient ReaderPreferenceReadWriteLock com::cosylab::acs::maci::manager::ManagerImpl::activationPendingRWLock [private]
 

Activation/deactivation synchronization mechanism. Reader lock is acquired when activation/deactivation is pending (i.e. until completed) and writer lock by processes which require not to be run until activation/deactivation is in progress.

transient Map com::cosylab::acs::maci::manager::ManagerImpl::activationSynchronization [private]
 

Activation/deactivation synchronization mechanism.

HashSet com::cosylab::acs::maci::manager::ManagerImpl::activeAlarms = new HashSet() [private]
 

Persistent set of raised (timer task) alarms.

transient int com::cosylab::acs::maci::manager::ManagerImpl::administratorPingInterval [private]
 

Administrator ping interval.

HandleDataStore com::cosylab::acs::maci::manager::ManagerImpl::administrators = new HandleDataStore(16, HANDLE_MASK) [private]
 

Administrators data.

transient ACSAlarmSystemInterface com::cosylab::acs::maci::manager::ManagerImpl::alarmSource [private]
 

Alarm System Interface.

transient CDBAccess com::cosylab::acs::maci::manager::ManagerImpl::cdbAccess = null [private]
 

CDB access.

transient ComponentSpec com::cosylab::acs::maci::manager::ManagerImpl::cdbActivation = null [private]
 

CDB component specification. If non-null CDB will be automatically activated on container login.

transient int com::cosylab::acs::maci::manager::ManagerImpl::clientPingInterval [private]
 

Client ping interval.

HandleDataStore com::cosylab::acs::maci::manager::ManagerImpl::clients = new HandleDataStore(16, HANDLE_MASK) [private]
 

Clients data.

transient String [] com::cosylab::acs::maci::manager::ManagerImpl::componentListCache = null [private]
 

Cached list of all component entries in the CDB.

HandleDataStore com::cosylab::acs::maci::manager::ManagerImpl::components = new HandleDataStore(128, HANDLE_MASK) [private]
 

Components data.

transient DAOProxy com::cosylab::acs::maci::manager::ManagerImpl::componentsDAO = null [private]
 

Components DAO dao (access to the CDB).

final int com::cosylab::acs::maci::manager::ManagerImpl::CONTAINER_RIGHTS = AccessRights.NONE [static, private]
 

Container rights.

transient Object com::cosylab::acs::maci::manager::ManagerImpl::containerLoggedInMonitor = null [private]
 

New container logged in notification.

transient int com::cosylab::acs::maci::manager::ManagerImpl::containerPingInterval [private]
 

Container ping interval.

HandleDataStore com::cosylab::acs::maci::manager::ManagerImpl::containers = new HandleDataStore(32, HANDLE_MASK) [private]
 

Containers data.

transient DAOProxy com::cosylab::acs::maci::manager::ManagerImpl::containersDAO = null [private]
 

Containers DAO dao (access to the CDB).

final String com::cosylab::acs::maci::manager::ManagerImpl::CURL_URI_SCHEMA = "curl://" [static, private]
 

CURL URI schema

final String com::cosylab::acs::maci::manager::ManagerImpl::DEFAULT_DOMAIN = "" [static, private]
 

Default manager domain.

Map com::cosylab::acs::maci::manager::ManagerImpl::defaultComponents = new HashMap() [private]
 

Map of default components (set via getDynamicComponent) overriding CDB state. Entry is: (String type, String name).

transient Timer com::cosylab::acs::maci::manager::ManagerImpl::delayedDeactivationTask = null [private]
 

Delatyed release timer.

String com::cosylab::acs::maci::manager::ManagerImpl::domain = DEFAULT_DOMAIN [private]
 

Manager domain name.

HashSet com::cosylab::acs::maci::manager::ManagerImpl::domains = new HashSet() [private]
 

List of domains to manage.

transient Context com::cosylab::acs::maci::manager::ManagerImpl::federationDirectory = null [private]
 

Root context of the federation directory.

transient boolean com::cosylab::acs::maci::manager::ManagerImpl::federationEnabled = false [private]
 

Federation enabled flag.

int com::cosylab::acs::maci::manager::ManagerImpl::handle = MANAGER_MASK [private]
 

Manager handle.

transient Timer com::cosylab::acs::maci::manager::ManagerImpl::heartbeatTask = null [private]
 

Heartbeat timer.

final int com::cosylab::acs::maci::manager::ManagerImpl::INTERDOMAIN_MANAGER_HANDLE = 0x05555555 [static, private]
 

Interdomain manager handle mask.

transient long com::cosylab::acs::maci::manager::ManagerImpl::lastExecutionId = 0 [private]
 

Last execution id;

transient LoadBalancingStrategy com::cosylab::acs::maci::manager::ManagerImpl::loadBalancingStrategy = null [private]
 

Load balancing strategy.

transient long com::cosylab::acs::maci::manager::ManagerImpl::lockTimeout [private]
 

Lock timeout (deadlock detection time) in ms.

transient Logger com::cosylab::acs::maci::manager::ManagerImpl::logger [private]
 

Logger.

transient Map com::cosylab::acs::maci::manager::ManagerImpl::managerCache = null [private]
 

Cache of non-local (federated) managers.

transient Object com::cosylab::acs::maci::manager::ManagerImpl::managerComponentReference = null [private]
 

Manager Component reference.

transient DAOProxy com::cosylab::acs::maci::manager::ManagerImpl::managerDAO = null [private]
 

Manager DAO dao (access to the CDB).

final String com::cosylab::acs::maci::manager::ManagerImpl::NAME_CDB_COMPONENTSPEC = "ACS.CDBComponentSpec" [static, private]
 

CDB component specification system property name.

final String com::cosylab::acs::maci::manager::ManagerImpl::NAME_CDB_DISABLE = "ACS.disableCDB" [static, private]
 

CDB disable system property name.

final String com::cosylab::acs::maci::manager::ManagerImpl::NAME_DOMAIN_DIRECTORY = "ACS.federationDirectory" [static, private]
 

Manager federation central naming service.

final String com::cosylab::acs::maci::manager::ManagerImpl::NAME_DOMAIN_LIST = "ACS.domains" [static, private]
 

Manager federation domain list property name.

final String com::cosylab::acs::maci::manager::ManagerImpl::NAME_LOAD_BALANCING_STRATEGY = "ACS.LoadBalancingStrategy" [static, private]
 

Load balancing strategy system property name.

volatile int com::cosylab::acs::maci::manager::ManagerImpl::originalContainers = 0 [private]
 

volatile int com::cosylab::acs::maci::manager::ManagerImpl::originalId = MANAGER_MASK [private]
 

transient Map com::cosylab::acs::maci::manager::ManagerImpl::pendingActivations = null [private]
 

List of all pending activations. Needed for cyclid dependency checks, since non-fuly-activasted components are not accessible via HandleDataStore iterator.

transient Set com::cosylab::acs::maci::manager::ManagerImpl::pendingContainerShutdown = null [private]
 

List of all pending container shutdowns.

transient int com::cosylab::acs::maci::manager::ManagerImpl::poolThreads [private]
 

Number of threads in thread pool (guarantees order of execution).

transient Prevayler com::cosylab::acs::maci::manager::ManagerImpl::prevayler = null [private]
 

Implementation of prevayler system.

transient Random com::cosylab::acs::maci::manager::ManagerImpl::random = null [private]
 

Manager domain name.

transient Context com::cosylab::acs::maci::manager::ManagerImpl::remoteDirectory = null [private]
 

Root context of the remote directory.

transient Object com::cosylab::acs::maci::manager::ManagerImpl::remoteDirectoryComponentReference = null [private]
 

Remote Directory Component reference.

final ObjectStreamField [] com::cosylab::acs::maci::manager::ManagerImpl::serialPersistentFields [static, private]
 

Initial value:

{ new ObjectStreamField("domain", String.class), new ObjectStreamField("handle", Integer.TYPE), new ObjectStreamField("clients", HandleDataStore.class), new ObjectStreamField("administrators", HandleDataStore.class), new ObjectStreamField("containers", HandleDataStore.class), new ObjectStreamField("components", HandleDataStore.class), new ObjectStreamField("unavailableComponents", Map.class), new ObjectStreamField("defaultComponents", Map.class), new ObjectStreamField("domains", HashSet.class), new ObjectStreamField("activeAlarms", HashSet.class)}
All fields that represent state of the Manager must be listed here. Those fields will be written to and read from persistence storage

final long com::cosylab::acs::maci::manager::ManagerImpl::serialVersionUID = 400178933049243893L [static, private]
 

Serial versionUID

transient AtomicBoolean com::cosylab::acs::maci::manager::ManagerImpl::shutdown [private]
 

Shutdown status.

transient ManagerShutdown com::cosylab::acs::maci::manager::ManagerImpl::shutdownImplementation = null [private]
 

Shutdown implementation.

transient ThreadPoolExecutor com::cosylab::acs::maci::manager::ManagerImpl::threadPool [private]
 

Thread pool (guarantees order of execution).

transient ComponentInfoTopologicalSortManager com::cosylab::acs::maci::manager::ManagerImpl::topologySortManager [private]
 

Component info topology sort manager.

transient Transport com::cosylab::acs::maci::manager::ManagerImpl::transport = null [private]
 

Implementation of transport helper.

Map com::cosylab::acs::maci::manager::ManagerImpl::unavailableComponents = new HashMap() [private]
 

List of all unavailable components.


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:11:24 2009 for ACS Java API by doxygen 1.3.8