Class QueueConfig
- java.lang.Object
-
- org.opennms.netmgt.telemetry.config.model.QueueConfig
-
- All Implemented Interfaces:
QueueDefinition
public class QueueConfig extends Object implements QueueDefinition
-
-
Constructor Summary
Constructors Constructor Description QueueConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
List<AdapterConfig>
getAdapters()
Optional<Integer>
getBatchIntervalMs()
Messages are aggregated in batches before being dispatched.Optional<Integer>
getBatchSize()
Messages are aggregated in batches before being dispatched.String
getName()
The name of the protocol.Optional<Integer>
getNumThreads()
Number of threads used for consuming/dispatching messages.Optional<Integer>
getQueueSize()
Maximum number of messages to keep in memory while waiting to be dispatched.Optional<Boolean>
getUseRoutingKey()
Whether or not the routing key should be used when forwarding messages to the broker.int
hashCode()
void
setAdapters(List<AdapterConfig> adapters)
void
setBatchIntervalMs(Integer batchIntervalMs)
void
setBatchSize(Integer batchSize)
void
setName(String name)
void
setNumThreads(Integer numThreads)
void
setQueueSize(Integer queueSize)
void
setUseRoutingKey(Boolean useRoutingKey)
String
toString()
-
-
-
Method Detail
-
getName
public 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 interfaceQueueDefinition
- Returns:
- the protocol name
-
setName
public void setName(String name)
-
getNumThreads
public Optional<Integer> getNumThreads()
Description copied from interface:QueueDefinition
Number of threads used for consuming/dispatching messages.- Specified by:
getNumThreads
in interfaceQueueDefinition
- Returns:
- the number of threads
-
setNumThreads
public void setNumThreads(Integer numThreads)
-
getBatchSize
public Optional<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 interfaceQueueDefinition
- Returns:
- the batch size
-
setBatchSize
public void setBatchSize(Integer batchSize)
-
getBatchIntervalMs
public Optional<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 interfaceQueueDefinition
- Returns:
- the batch interval
-
setBatchIntervalMs
public void setBatchIntervalMs(Integer batchIntervalMs)
-
getQueueSize
public Optional<Integer> getQueueSize()
Description copied from interface:QueueDefinition
Maximum number of messages to keep in memory while waiting to be dispatched.- Specified by:
getQueueSize
in interfaceQueueDefinition
- Returns:
- the queue size
-
setQueueSize
public void setQueueSize(Integer queueSize)
-
getUseRoutingKey
public Optional<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 interfaceQueueDefinition
- Returns:
- whether or not to use the routing key
-
setUseRoutingKey
public void setUseRoutingKey(Boolean useRoutingKey)
-
getAdapters
public List<AdapterConfig> getAdapters()
-
setAdapters
public void setAdapters(List<AdapterConfig> adapters)
-
-