Class 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 using JdbcEventWriter 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • m_config

        protected EventdConfiguration m_config
        The config class loaded from the config file
    • Constructor Detail

      • EventdConfigManager

        public EventdConfigManager()
                            throws java.io.IOException

        Constructor for EventdConfigManager.

        Parameters:
        stream - a InputStream object.
        Throws:
        java.io.IOException - if any.
    • 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 interface EventdConfig
        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 interface EventdConfig
        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 interface EventdConfig
        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 interface EventdConfig
        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 interface EventdConfig
        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 interface EventdConfig
        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 interface EventdConfig
        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 interface EventdConfig
        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 interface EventdConfig
        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 using JdbcEventWriter 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 interface EventdConfig
        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 interface EventdConfig
        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 interface EventdConfig
        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 interface EventdConfig
        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 interface EventdConfig
        Returns:
        interval in ms