Package org.opennms.netmgt.config
Class EventdConfigManager
- java.lang.Object
-
- org.opennms.netmgt.config.EventdConfigManager
-
- All Implemented Interfaces:
EventdConfig
public class EventdConfigManager extends java.lang.Object implements EventdConfig
EventdConfigManager class.
- Author:
- david
-
-
Field Summary
Fields Modifier and Type Field Description protected EventdConfiguration
m_config
The 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 int
getBatchIntervalMs()
Messages are aggregated in batches before being dispatched.int
getBatchSize()
Messages are aggregated in batches before being dispatched.java.lang.String
getGetNextEventID()
Deprecated.This is only used when usingJdbcEventWriter
so when we remove the JDBC implementation, we can get rid of this class.int
getNumThreads()
Number of threads used for consuming/dispatching messages.int
getQueueLength()
Return the length of the incoming event queue.int
getQueueSize()
Maximum number of messages to keep in memory while waiting to be dispatched.java.util.concurrent.locks.Lock
getReadLock()
int
getReceivers()
Return the number of event receivers to be started.int
getSocketSoTimeoutPeriod()
Return timeout to be set on the socket.java.lang.String
getSocketSoTimeoutRequired()
Return string indicating if timeout is to be set on the socket.java.lang.String
getTCPIpAddress()
Return the IP address on which eventd listens for TCP connections.int
getTCPPort()
Return the port on which eventd listens for TCP connections.java.lang.String
getUDPIpAddress()
Return the IP address on which eventd listens for UDP packets.int
getUDPPort()
Return the port on which eventd listens for UDP data.java.util.concurrent.locks.Lock
getWriteLock()
boolean
hasSocketSoTimeoutPeriod()
Return flag indicating if timeout to be set on the socket is specified.boolean
shouldLogEventSummaries()
Whether or not Eventd should log event summaries.
-
-
-
Field Detail
-
m_config
protected EventdConfiguration m_config
The config class loaded from the config file
-
-
Method Detail
-
getReadLock
public java.util.concurrent.locks.Lock getReadLock()
-
getWriteLock
public java.util.concurrent.locks.Lock getWriteLock()
-
getTCPIpAddress
public java.lang.String getTCPIpAddress()
Return the IP address on which eventd listens for TCP connections.- Specified by:
getTCPIpAddress
in 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:
getTCPPort
in interfaceEventdConfig
- Returns:
- the port on which eventd listens for TCP connections
-
getUDPIpAddress
public java.lang.String getUDPIpAddress()
Return the IP address on which eventd listens for UDP packets.- Specified by:
getUDPIpAddress
in 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:
getUDPPort
in 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:
getReceivers
in interfaceEventdConfig
- Returns:
- the number of event receivers to be started
-
getQueueLength
public int getQueueLength()
Return the length of the incoming event queue.- Specified by:
getQueueLength
in interfaceEventdConfig
- Returns:
- the maximum number of events that can be stored in the incoming event queue
-
getSocketSoTimeoutRequired
public java.lang.String getSocketSoTimeoutRequired()
Return string indicating if timeout is to be set on the socket.- Specified by:
getSocketSoTimeoutRequired
in 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:
getSocketSoTimeoutPeriod
in 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:
hasSocketSoTimeoutPeriod
in 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 java.lang.String getGetNextEventID()
Deprecated.This is only used when usingJdbcEventWriter
so 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:
getGetNextEventID
in interfaceEventdConfig
- Returns:
- the SQL statement to get the next event ID
-
getNumThreads
public int getNumThreads()
Description copied from interface:EventdConfig
Number of threads used for consuming/dispatching messages.- Specified by:
getNumThreads
in interfaceEventdConfig
- Returns:
- number of threads
-
getQueueSize
public int getQueueSize()
Description copied from interface:EventdConfig
Maximum number of messages to keep in memory while waiting to be dispatched.- Specified by:
getQueueSize
in interfaceEventdConfig
- Returns:
- queue size
-
getBatchSize
public int getBatchSize()
Description copied from interface:EventdConfig
Messages are aggregated in batches before being dispatched. When the batch reaches this size, it will be dispatched.- Specified by:
getBatchSize
in interfaceEventdConfig
- Returns:
- batch size
-
getBatchIntervalMs
public int getBatchIntervalMs()
Description copied from interface:EventdConfig
Messages 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:
getBatchIntervalMs
in interfaceEventdConfig
- Returns:
- interval in ms
-
-