Class QueueConfig

    • Constructor Summary

      Constructors 
      Constructor Description
      QueueConfig()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.util.List<AdapterConfig> getAdapters()  
      java.util.Optional<java.lang.Integer> getBatchIntervalMs()
      Messages are aggregated in batches before being dispatched.
      java.util.Optional<java.lang.Integer> getBatchSize()
      Messages are aggregated in batches before being dispatched.
      java.lang.String getName()
      The name of the protocol.
      java.util.Optional<java.lang.Integer> getNumThreads()
      Number of threads used for consuming/dispatching messages.
      java.util.Optional<java.lang.Integer> getQueueSize()
      Maximum number of messages to keep in memory while waiting to be dispatched.
      java.util.Optional<java.lang.Boolean> getUseRoutingKey()
      Whether or not the routing key should be used when forwarding messages to the broker.
      int hashCode()  
      void setAdapters​(java.util.List<AdapterConfig> adapters)  
      void setBatchIntervalMs​(java.lang.Integer batchIntervalMs)  
      void setBatchSize​(java.lang.Integer batchSize)  
      void setName​(java.lang.String name)  
      void setNumThreads​(java.lang.Integer numThreads)  
      void setQueueSize​(java.lang.Integer queueSize)  
      void setUseRoutingKey​(java.lang.Boolean useRoutingKey)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • QueueConfig

        public QueueConfig()
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: QueueDefinition
        The name of the protocol. This is used as a suffix for any associated queues that are created and must be the same on both OpenNMS and Minion.
        Specified by:
        getName in interface QueueDefinition
        Returns:
        the protocol name
      • setName

        public void setName​(java.lang.String name)
      • getNumThreads

        public java.util.Optional<java.lang.Integer> getNumThreads()
        Description copied from interface: QueueDefinition
        Number of threads used for consuming/dispatching messages.
        Specified by:
        getNumThreads in interface QueueDefinition
        Returns:
        the number of threads
      • setNumThreads

        public void setNumThreads​(java.lang.Integer numThreads)
      • getBatchSize

        public java.util.Optional<java.lang.Integer> getBatchSize()
        Description copied from interface: QueueDefinition
        Messages are aggregated in batches before being dispatched. When the batch reaches this size, it will be dispatched.
        Specified by:
        getBatchSize in interface QueueDefinition
        Returns:
        the batch size
      • setBatchSize

        public void setBatchSize​(java.lang.Integer batchSize)
      • getBatchIntervalMs

        public java.util.Optional<java.lang.Integer> getBatchIntervalMs()
        Description copied from interface: QueueDefinition
        Messages are aggregated in batches before being dispatched. When the batch has been created for longer than this interval (ms) it will be dispatched, regardless of the current size.
        Specified by:
        getBatchIntervalMs in interface QueueDefinition
        Returns:
        the batch interval
      • setBatchIntervalMs

        public void setBatchIntervalMs​(java.lang.Integer batchIntervalMs)
      • getQueueSize

        public java.util.Optional<java.lang.Integer> getQueueSize()
        Description copied from interface: QueueDefinition
        Maximum number of messages to keep in memory while waiting to be dispatched.
        Specified by:
        getQueueSize in interface QueueDefinition
        Returns:
        the queue size
      • setQueueSize

        public void setQueueSize​(java.lang.Integer queueSize)
      • getUseRoutingKey

        public java.util.Optional<java.lang.Boolean> getUseRoutingKey()
        Description copied from interface: QueueDefinition
        Whether or not the routing key should be used when forwarding messages to the broker.
        Specified by:
        getUseRoutingKey in interface QueueDefinition
        Returns:
        whether or not to use the routing key
      • setUseRoutingKey

        public void setUseRoutingKey​(java.lang.Boolean useRoutingKey)
      • getAdapters

        public java.util.List<AdapterConfig> getAdapters()
      • setAdapters

        public void setAdapters​(java.util.List<AdapterConfig> adapters)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object