Package org.opennms.netmgt.alarmd
Class AlarmPersisterImpl
- java.lang.Object
-
- org.opennms.netmgt.alarmd.AlarmPersisterImpl
-
- All Implemented Interfaces:
AlarmPersister
public class AlarmPersisterImpl extends java.lang.Object implements AlarmPersister
Singleton to persist OnmsAlarms.- Version:
- $Id: $
- Author:
- David Hustace
-
-
Field Summary
Fields Modifier and Type Field Description protected static boolean
LEGACY_ALARM_STATE
protected static boolean
NEW_IF_CLEARED
protected static java.lang.Integer
NUM_STRIPE_LOCKS
static java.lang.String
RELATED_REDUCTION_KEY_PREFIX
-
Constructor Summary
Constructors Constructor Description AlarmPersisterImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AlarmEntityNotifier
getAlarmChangeListener()
AlarmDao
getAlarmDao()
getAlarmDaoEventDao
getEventDao()
getEventDaoEventUtil
getEventUtil()
getEventUtilorg.springframework.transaction.support.TransactionOperations
getTransactionOperations()
boolean
isCreateNewAlarmIfClearedAlarmExists()
boolean
islegacyAlarmState()
void
onExtensionRegistered(AlarmPersisterExtension ext, java.util.Map<java.lang.String,java.lang.String> properties)
void
onExtensionUnregistered(AlarmPersisterExtension ext, java.util.Map<java.lang.String,java.lang.String> properties)
OnmsAlarm
persist(Event event)
persistvoid
setAlarmChangeListener(AlarmEntityNotifier alarmEntityNotifier)
void
setAlarmDao(AlarmDao alarmDao)
setAlarmDaovoid
setCreateNewAlarmIfClearedAlarmExists(boolean createNewAlarmIfClearedAlarmExists)
void
setEventDao(EventDao eventDao)
setEventDaovoid
setEventUtil(EventUtil eventUtil)
setEventUtilvoid
setLegacyAlarmState(boolean legacyAlarmState)
void
setTransactionOperations(org.springframework.transaction.support.TransactionOperations transactionOperations)
-
-
-
Field Detail
-
RELATED_REDUCTION_KEY_PREFIX
public static final java.lang.String RELATED_REDUCTION_KEY_PREFIX
- See Also:
- Constant Field Values
-
NUM_STRIPE_LOCKS
protected static final java.lang.Integer NUM_STRIPE_LOCKS
-
NEW_IF_CLEARED
protected static boolean NEW_IF_CLEARED
-
LEGACY_ALARM_STATE
protected static boolean LEGACY_ALARM_STATE
-
-
Method Detail
-
persist
public OnmsAlarm persist(Event event)
Description copied from interface:AlarmPersister
persist
- Specified by:
persist
in interfaceAlarmPersister
- Parameters:
event
- aEvent
object- Returns:
- the new/updated
OnmsAlarm
-
getTransactionOperations
public org.springframework.transaction.support.TransactionOperations getTransactionOperations()
-
setTransactionOperations
public void setTransactionOperations(org.springframework.transaction.support.TransactionOperations transactionOperations)
-
setAlarmDao
public void setAlarmDao(AlarmDao alarmDao)
setAlarmDao
- Parameters:
alarmDao
- aAlarmDao
object.
-
setEventDao
public void setEventDao(EventDao eventDao)
setEventDao
- Parameters:
eventDao
- aEventDao
object.
-
setEventUtil
public void setEventUtil(EventUtil eventUtil)
setEventUtil
- Parameters:
eventUtil
-
-
getAlarmChangeListener
public AlarmEntityNotifier getAlarmChangeListener()
-
setAlarmChangeListener
public void setAlarmChangeListener(AlarmEntityNotifier alarmEntityNotifier)
-
onExtensionRegistered
public void onExtensionRegistered(AlarmPersisterExtension ext, java.util.Map<java.lang.String,java.lang.String> properties)
-
onExtensionUnregistered
public void onExtensionUnregistered(AlarmPersisterExtension ext, java.util.Map<java.lang.String,java.lang.String> properties)
-
isCreateNewAlarmIfClearedAlarmExists
public boolean isCreateNewAlarmIfClearedAlarmExists()
-
setCreateNewAlarmIfClearedAlarmExists
public void setCreateNewAlarmIfClearedAlarmExists(boolean createNewAlarmIfClearedAlarmExists)
-
islegacyAlarmState
public boolean islegacyAlarmState()
-
setLegacyAlarmState
public void setLegacyAlarmState(boolean legacyAlarmState)
-
-