2 * Copyright (c) 2014 Brocade Communications Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.util.concurrent;
10 import static java.util.Objects.requireNonNull;
12 import javax.management.ConstructorParameters;
13 import org.eclipse.jdt.annotation.NonNullByDefault;
16 * Class used by the {@link QueuedNotificationManager} that contains a snapshot of notification
17 * queue statistics for a listener.
19 * @author Thomas Pantelis
20 * @see QueuedNotificationManager
23 public class ListenerNotificationQueueStats {
24 private final String listenerClassName;
25 private final int currentQueueSize;
27 @ConstructorParameters({ "listenerClassName", "currentQueueSize" })
28 public ListenerNotificationQueueStats(final String listenerClassName, final int currentQueueSize) {
29 this.listenerClassName = requireNonNull(listenerClassName);
30 this.currentQueueSize = currentQueueSize;
34 * Returns the name of the listener class.
36 public String getListenerClassName() {
37 return listenerClassName;
41 * Returns the current notification queue size.
43 public int getCurrentQueueSize() {
44 return currentQueueSize;