Package org.opennms.netmgt.config
Class EventdConfigManager
- java.lang.Object
-
- org.opennms.netmgt.config.EventdConfigManager
-
- All Implemented Interfaces:
EventdConfig
public class EventdConfigManager extends Object implements EventdConfig
EventdConfigManager class.
- Author:
- david
-
-
Field Summary
Fields Modifier and Type Field Description protected EventdConfigurationm_configThe config class loaded from the config file
-
Constructor Summary
Constructors Constructor Description EventdConfigManager()Constructor for EventdConfigManager.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intgetBatchIntervalMs()Messages are aggregated in batches before being dispatched.intgetBatchSize()Messages are aggregated in batches before being dispatched.StringgetGetNextEventID()Deprecated.This is only used when usingJdbcEventWriterso when we remove the JDBC implementation, we can get rid of this class.intgetNumThreads()Number of threads used for consuming/dispatching messages.intgetQueueLength()Return the length of the incoming event queue.intgetQueueSize()Maximum number of messages to keep in memory while waiting to be dispatched.LockgetReadLock()intgetReceivers()Return the number of event receivers to be started.intgetSocketSoTimeoutPeriod()Return timeout to be set on the socket.StringgetSocketSoTimeoutRequired()Return string indicating if timeout is to be set on the socket.StringgetTCPIpAddress()Return the IP address on which eventd listens for TCP connections.intgetTCPPort()Return the port on which eventd listens for TCP connections.StringgetUDPIpAddress()Return the IP address on which eventd listens for UDP packets.intgetUDPPort()Return the port on which eventd listens for UDP data.LockgetWriteLock()booleanhasSocketSoTimeoutPeriod()Return flag indicating if timeout to be set on the socket is specified.booleanshouldLogEventSummaries()Whether or not Eventd should log event summaries.
-
-
-
Field Detail
-
m_config
protected EventdConfiguration m_config
The config class loaded from the config file
-
-
Constructor Detail
-
EventdConfigManager
public EventdConfigManager() throws IOExceptionConstructor for EventdConfigManager.
- Parameters:
stream- aInputStreamobject.- Throws:
IOException- if any.
-
-
Method Detail
-
getReadLock
public Lock getReadLock()
-
getWriteLock
public Lock getWriteLock()
-
getTCPIpAddress
public String getTCPIpAddress()
Return the IP address on which eventd listens for TCP connections.- Specified by:
getTCPIpAddressin interfaceEventdConfig- Returns:
- the IP address on which eventd listens for TCP connections
-
getTCPPort
public int getTCPPort()
Return the port on which eventd listens for TCP connections.- Specified by:
getTCPPortin interfaceEventdConfig- Returns:
- the port on which eventd listens for TCP connections
-
getUDPIpAddress
public String getUDPIpAddress()
Return the IP address on which eventd listens for UDP packets.- Specified by:
getUDPIpAddressin interfaceEventdConfig- Returns:
- the IP address on which eventd listens for UDP packets
-
getUDPPort
public int getUDPPort()
Return the port on which eventd listens for UDP data.- Specified by:
getUDPPortin interfaceEventdConfig- Returns:
- the port on which eventd listens for UDP data
-
getReceivers
public int getReceivers()
Return the number of event receivers to be started.- Specified by:
getReceiversin interfaceEventdConfig- Returns:
- the number of event receivers to be started
-
getQueueLength
public int getQueueLength()
Return the length of the incoming event queue.- Specified by:
getQueueLengthin interfaceEventdConfig- Returns:
- the maximum number of events that can be stored in the incoming event queue
-
getSocketSoTimeoutRequired
public String getSocketSoTimeoutRequired()
Return string indicating if timeout is to be set on the socket.- Specified by:
getSocketSoTimeoutRequiredin interfaceEventdConfig- Returns:
- string indicating if timeout is to be set on the socket
-
getSocketSoTimeoutPeriod
public int getSocketSoTimeoutPeriod()
Return timeout to be set on the socket.- Specified by:
getSocketSoTimeoutPeriodin interfaceEventdConfig- Returns:
- timeout is to be set on the socket
-
hasSocketSoTimeoutPeriod
public boolean hasSocketSoTimeoutPeriod()
Return flag indicating if timeout to be set on the socket is specified.- Specified by:
hasSocketSoTimeoutPeriodin interfaceEventdConfig- Returns:
- flag indicating if timeout to be set on the socket is specified
-
shouldLogEventSummaries
public boolean shouldLogEventSummaries()
Whether or not Eventd should log event summaries.
-
getGetNextEventID
public String getGetNextEventID()
Deprecated.This is only used when usingJdbcEventWriterso when we remove the JDBC implementation, we can get rid of this class.Return the SQL statement to get the next event ID.- Specified by:
getGetNextEventIDin interfaceEventdConfig- Returns:
- the SQL statement to get the next event ID
-
getNumThreads
public int getNumThreads()
Description copied from interface:EventdConfigNumber of threads used for consuming/dispatching messages.- Specified by:
getNumThreadsin interfaceEventdConfig- Returns:
- number of threads
-
getQueueSize
public int getQueueSize()
Description copied from interface:EventdConfigMaximum number of messages to keep in memory while waiting to be dispatched.- Specified by:
getQueueSizein interfaceEventdConfig- Returns:
- queue size
-
getBatchSize
public int getBatchSize()
Description copied from interface:EventdConfigMessages are aggregated in batches before being dispatched. When the batch reaches this size, it will be dispatched.- Specified by:
getBatchSizein interfaceEventdConfig- Returns:
- batch size
-
getBatchIntervalMs
public int getBatchIntervalMs()
Description copied from interface:EventdConfigMessages are aggregated in batches before being dispatched. When the batch has been created for longer than this interval it will be dispatched, regardless of the size.- Specified by:
getBatchIntervalMsin interfaceEventdConfig- Returns:
- interval in ms
-
-