50f2ca45a09e1d5fc7a3aaaf7fb613b6921c2d81
[yangtools.git] / common / util / src / main / java / org / opendaylight / yangtools / util / concurrent / ListenerNotificationQueueStats.java
1 /*
2  * Copyright (c) 2014 Brocade Communications Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.yangtools.util.concurrent;
10
11 import java.beans.ConstructorProperties;
12
13 /**
14  * Class used by the {@link QueuedNotificationManager} that contains a snapshot of notification
15  * queue statistics for a listener.
16  *
17  * @author Thomas Pantelis
18  * @see QueuedNotificationManager
19  */
20 public class ListenerNotificationQueueStats {
21
22     private final String listenerClassName;
23     private final int currentQueueSize;
24
25     @ConstructorProperties({ "listenerClassName","currentQueueSize" })
26     public ListenerNotificationQueueStats(final String listenerClassName, final int currentQueueSize) {
27         this.listenerClassName = listenerClassName;
28         this.currentQueueSize = currentQueueSize;
29     }
30
31     /**
32      * Returns the name of the listener class.
33      */
34     public String getListenerClassName() {
35         return listenerClassName;
36     }
37
38     /**
39      * Returns the current notification queue size.
40      */
41     public int getCurrentQueueSize() {
42         return currentQueueSize;
43     }
44 }