Public Member Functions

cern.laser.business.cache.AlarmCache Interface Reference

Inheritance diagram for cern.laser.business.cache.AlarmCache:
com.cosylab.acs.laser.dao.ACSAlarmCacheImpl

List of all members.

Public Member Functions

void initializeAlarmCache (Map alarms, Map activeLists)
Alarm getCopy (String identifier) throws AlarmCacheException
Alarm getReference (String identifier) throws AlarmCacheException
void replace (Alarm alarm) throws AlarmCacheException
void put (Alarm alarm) throws AlarmCacheException
void invalidate (String identifier) throws AlarmCacheException
CategoryActiveList getActiveListReference (Integer identifier) throws AlarmCacheException
void close ()
void removeActiveList (Integer identifier) throws AlarmCacheException

Detailed Description

AlarmImpl cache service class. It defines the interface for the alarm cache which holds alarm plain objects loaded and persisted via the alarm entity beans. Changes to the objects in the cache are propagated and published to the clients.

Author:
fracalde

Member Function Documentation

void cern.laser.business.cache.AlarmCache.close (  ) 

Close and deallocate the resources.

Implemented in com.cosylab.acs.laser.dao.ACSAlarmCacheImpl.

CategoryActiveList cern.laser.business.cache.AlarmCache.getActiveListReference ( Integer  identifier  )  throws AlarmCacheException

Returns a reference to the active list for a category.

Parameters:
identifier the active list private identifier
Returns:
the reference to the active list object.
Exceptions:
Exception if the operation can not be performed

Implemented in com.cosylab.acs.laser.dao.ACSAlarmCacheImpl.

Alarm cern.laser.business.cache.AlarmCache.getCopy ( String  identifier  )  throws AlarmCacheException

Returns a clone of the cached alarm.

Parameters:
identifier the alarm private identifier
Returns:
the cloned alarm object.
Exceptions:
Exception if the operation can not be performed

Implemented in com.cosylab.acs.laser.dao.ACSAlarmCacheImpl.

Referenced by cern.laser.business.pojo.AlarmSourceMonitorImpl.check(), cern.laser.business.pojo.CoreServiceImpl.getAlarmById(), cern.laser.business.pojo.CoreServiceImpl.getAlarmByTriplet(), cern.laser.business.pojo.AlarmDefinitionServiceImpl.removeAlarm(), and cern.laser.business.pojo.AlarmDefinitionServiceImpl.removeAlarms().

void cern.laser.business.cache.AlarmCache.initializeAlarmCache ( Map  alarms,
Map  activeLists 
)

Initializes the alarm cache. Can only be called once.

Implemented in com.cosylab.acs.laser.dao.ACSAlarmCacheImpl.

void cern.laser.business.cache.AlarmCache.invalidate ( String  identifier  )  throws AlarmCacheException

Invalidate the cached object. Subsequent accesses to that object will cause the object to be loaded again from the ejb.

Parameters:
identifier the alarm private identifier
Exceptions:
Exception if the operation can not be performed

Implemented in com.cosylab.acs.laser.dao.ACSAlarmCacheImpl.

Referenced by cern.laser.business.pojo.CategoryDefinitionServiceImpl.createCategoryLink(), cern.laser.business.pojo.CategoryDefinitionServiceImpl.removeCategoryLink(), cern.laser.business.pojo.AlarmDefinitionServiceImpl.updateAlarm(), and cern.laser.business.pojo.SourceDefinitionServiceImpl.updateSource().

void cern.laser.business.cache.AlarmCache.put ( Alarm  alarm  )  throws AlarmCacheException

Puts an object in the cache. If that object was already in the cache it is replaced. This method combines the methods replace, and release alarm the new alarm object Exception if the operation can not be performed

Implemented in com.cosylab.acs.laser.dao.ACSAlarmCacheImpl.

void cern.laser.business.cache.AlarmCache.removeActiveList ( Integer  identifier  )  throws AlarmCacheException

Remove the active list associated with the given category id.

Parameters:
identifier the id of the active list to destroy (=category id)
Exceptions:
Exception if the operation cannot be performed

Implemented in com.cosylab.acs.laser.dao.ACSAlarmCacheImpl.

void cern.laser.business.cache.AlarmCache.replace ( Alarm  alarm  )  throws AlarmCacheException

Returns a reference to the alarm specified. The object is locked from modification by other cache users.

Parameters:
identifier the id for the alarm
Returns:
a reference to the alarm
Exceptions:
AlarmCacheException if the operation cannot be performed Releases the lock held on an alarm.
Parameters:
identifier the id for the alarm
Exceptions:
AlarmCacheException if the operation cannot be performed. Puts alarm in the cache. This method must be called after as the alarm need to be locked. alarm object to put in cache AlarmCacheException if the operation cannot be performed. However, the lock is released.

Implemented in com.cosylab.acs.laser.dao.ACSAlarmCacheImpl.


The documentation for this interface was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties