Class IdentityQueuedNotificationManager<L,N>
java.lang.Object
org.opendaylight.yangtools.concepts.AbstractIdentifiable<T,T>
org.opendaylight.yangtools.concepts.AbstractSimpleIdentifiable<String>
org.opendaylight.yangtools.util.concurrent.IdentityQueuedNotificationManager<L,N>
- All Implemented Interfaces:
Identifiable<String>
,NotificationManager<L,
N>
- Direct Known Subclasses:
QueuedNotificationManager
@Beta
@NonNullByDefault
public class IdentityQueuedNotificationManager<L,N>
extends AbstractSimpleIdentifiable<String>
-
Constructor Summary
ConstructorsConstructorDescriptionIdentityQueuedNotificationManager
(String name, Executor executor, int maxQueueCapacity, QueuedNotificationManager.BatchedInvoker<L, N> listenerInvoker) -
Method Summary
Modifier and TypeMethodDescriptionfinal Executor
Returns theExecutor
to used for notification tasks.final int
Returns the maximum listener queue capacity.Return anQueuedNotificationManagerMXBean
tied to this instance.final void
submitNotification
(L listener, N notification) Submits a notification to be queued and dispatched to the given listener.final void
submitNotifications
(L listener, @Nullable Iterable<N> notifications) Submits notifications to be queued and dispatched to the given listener.Methods inherited from class org.opendaylight.yangtools.concepts.AbstractIdentifiable
addToStringAttributes, getIdentifier, toString
-
Constructor Details
-
IdentityQueuedNotificationManager
public IdentityQueuedNotificationManager(String name, Executor executor, int maxQueueCapacity, QueuedNotificationManager.BatchedInvoker<L, N> listenerInvoker)
-
-
Method Details
-
getExecutor
Returns theExecutor
to used for notification tasks. -
getMaxQueueCapacity
public final int getMaxQueueCapacity()Returns the maximum listener queue capacity. -
getMXBean
Return anQueuedNotificationManagerMXBean
tied to this instance.- Returns:
- An QueuedNotificationManagerMXBean object.
-
submitNotification
Description copied from interface:NotificationManager
Submits a notification to be queued and dispatched to the given listener.Note: This method may block if the listener queue is currently full.
- Specified by:
submitNotification
in interfaceNotificationManager<T,
L> - Parameters:
listener
- the listener to notifynotification
- the notification to dispatch
-
submitNotifications
Description copied from interface:NotificationManager
Submits notifications to be queued and dispatched to the given listener.Note: This method may block if the listener queue is currently full.
- Specified by:
submitNotifications
in interfaceNotificationManager<T,
L> - Parameters:
listener
- the listener to notifynotifications
- the notifications to dispatch
-