Class MapBasedQueueDef
- java.lang.Object
-
- org.opennms.netmgt.telemetry.distributed.common.MapBasedQueueDef
-
- All Implemented Interfaces:
QueueDefinition
- Direct Known Subclasses:
MapBasedParserDef
public class MapBasedQueueDef extends Object implements QueueDefinition
-
-
Constructor Summary
Constructors Constructor Description MapBasedQueueDef(PropertyTree definition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Integer>getBatchIntervalMs()Messages are aggregated in batches before being dispatched.Optional<Integer>getBatchSize()Messages are aggregated in batches before being dispatched.StringgetName()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.
-
-
-
Constructor Detail
-
MapBasedQueueDef
public MapBasedQueueDef(PropertyTree definition)
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:QueueDefinitionThe 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:
getNamein interfaceQueueDefinition- Returns:
- the protocol name
-
getNumThreads
public Optional<Integer> getNumThreads()
Description copied from interface:QueueDefinitionNumber of threads used for consuming/dispatching messages.- Specified by:
getNumThreadsin interfaceQueueDefinition- Returns:
- the number of threads
-
getBatchSize
public Optional<Integer> getBatchSize()
Description copied from interface:QueueDefinitionMessages are aggregated in batches before being dispatched. When the batch reaches this size, it will be dispatched.- Specified by:
getBatchSizein interfaceQueueDefinition- Returns:
- the batch size
-
getBatchIntervalMs
public Optional<Integer> getBatchIntervalMs()
Description copied from interface:QueueDefinitionMessages 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:
getBatchIntervalMsin interfaceQueueDefinition- Returns:
- the batch interval
-
getQueueSize
public Optional<Integer> getQueueSize()
Description copied from interface:QueueDefinitionMaximum number of messages to keep in memory while waiting to be dispatched.- Specified by:
getQueueSizein interfaceQueueDefinition- Returns:
- the queue size
-
getUseRoutingKey
public Optional<Boolean> getUseRoutingKey()
Description copied from interface:QueueDefinitionWhether or not the routing key should be used when forwarding messages to the broker.- Specified by:
getUseRoutingKeyin interfaceQueueDefinition- Returns:
- whether or not to use the routing key
-
-