Class DeviceConfigSinkModuleImpl
- java.lang.Object
-
- org.opennms.core.ipc.sink.xml.AbstractXmlSinkModule<DeviceConfigSinkDTO,DeviceConfigSinkDTO>
-
- org.opennms.features.deviceconfig.sink.module.DeviceConfigSinkModuleImpl
-
- All Implemented Interfaces:
AsyncPolicy
,SinkModule<DeviceConfigSinkDTO,DeviceConfigSinkDTO>
,DeviceConfigSinkModule
public class DeviceConfigSinkModuleImpl extends AbstractXmlSinkModule<DeviceConfigSinkDTO,DeviceConfigSinkDTO> implements DeviceConfigSinkModule, AsyncPolicy
-
-
Field Summary
Fields Modifier and Type Field Description static String
MODULE_ID
-
Fields inherited from interface org.opennms.core.ipc.sink.api.SinkModule
HEARTBEAT_MODULE_ID
-
-
Constructor Summary
Constructors Constructor Description DeviceConfigSinkModuleImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AggregationPolicy<DeviceConfigSinkDTO,DeviceConfigSinkDTO,?>
getAggregationPolicy()
Defines how messages should be combined, and when they should be "released".AsyncPolicy
getAsyncPolicy()
Defines how messages should be asynchronously dispatched.String
getId()
Globally unique identifier.int
getNumConsumerThreads()
The number of threads used to consume from the broker.int
getNumThreads()
Number of background threads that will be used to dispatch messages from the queue.int
getQueueSize()
Maximum number of messages that can be queued awaiting for dispatch.boolean
isBlockWhenFull()
Used to control the behavior of a dispatch when the queue is full.void
setBlockWhenFull(boolean blockWhenFull)
void
setNumConsumerThreads(int numConsumerThreads)
void
setNumThreads(int numThreads)
void
setQueueSize(int queueSize)
-
Methods inherited from class org.opennms.core.ipc.sink.xml.AbstractXmlSinkModule
equals, hashCode, marshal, marshalSingleMessage, unmarshal, unmarshalSingleMessage
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.core.ipc.sink.api.SinkModule
getRoutingKey, marshal, marshalSingleMessage, unmarshal, unmarshalSingleMessage
-
-
-
-
Field Detail
-
MODULE_ID
public static final String MODULE_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:SinkModule
Globally unique identifier. Used in the JMS queue name in the Camel implementation.- Specified by:
getId
in interfaceSinkModule<DeviceConfigSinkDTO,DeviceConfigSinkDTO>
-
getAggregationPolicy
public AggregationPolicy<DeviceConfigSinkDTO,DeviceConfigSinkDTO,?> getAggregationPolicy()
Description copied from interface:SinkModule
Defines how messages should be combined, and when they should be "released". Modules that do not wish to use aggregation can returnnull
.- Specified by:
getAggregationPolicy
in interfaceSinkModule<DeviceConfigSinkDTO,DeviceConfigSinkDTO>
- Returns:
- the
AggregationPolicy
used to combine messages, ornull
if the messages should not be combined.
-
getAsyncPolicy
public AsyncPolicy getAsyncPolicy()
Description copied from interface:SinkModule
Defines how messages should be asynchronously dispatched.- Specified by:
getAsyncPolicy
in interfaceSinkModule<DeviceConfigSinkDTO,DeviceConfigSinkDTO>
- Returns:
- the
AsyncPolicy
used when asynchronously dispatching messages for this module.
-
getNumConsumerThreads
public int getNumConsumerThreads()
Description copied from interface:SinkModule
The number of threads used to consume from the broker.- Specified by:
getNumConsumerThreads
in interfaceSinkModule<DeviceConfigSinkDTO,DeviceConfigSinkDTO>
-
setNumConsumerThreads
public void setNumConsumerThreads(int numConsumerThreads)
-
getQueueSize
public int getQueueSize()
Description copied from interface:AsyncPolicy
Maximum number of messages that can be queued awaiting for dispatch.- Specified by:
getQueueSize
in interfaceAsyncPolicy
- Returns:
- queue size
-
setQueueSize
public void setQueueSize(int queueSize)
-
getNumThreads
public int getNumThreads()
Description copied from interface:AsyncPolicy
Number of background threads that will be used to dispatch messages from the queue.- Specified by:
getNumThreads
in interfaceAsyncPolicy
- Returns:
- number of threads
-
setNumThreads
public void setNumThreads(int numThreads)
-
isBlockWhenFull
public boolean isBlockWhenFull()
Description copied from interface:AsyncPolicy
Used to control the behavior of a dispatch when the queue is full. Whentrue
the calling thread will be blocked until the queue can accept the message, or the thread is interrupted. Whenfalse
the dispatch will return a future with aRejectedExecutionException
/- Specified by:
isBlockWhenFull
in interfaceAsyncPolicy
- Returns:
- whether or not the thread calling dispatch should block when the queue is full
-
setBlockWhenFull
public void setBlockWhenFull(boolean blockWhenFull)
-
-