Add UnsignedLongBitmap
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / DatastoreInfoMXBeanImpl.java
1 /*
2  * Copyright (c) 2015 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 package org.opendaylight.controller.cluster.datastore;
9
10 import org.opendaylight.controller.cluster.datastore.jmx.mbeans.DatastoreInfoMXBean;
11 import org.opendaylight.controller.cluster.datastore.utils.ActorUtils;
12 import org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean;
13
14 /**
15  * Implementation of DatastoreInfoMXBean.
16  *
17  * @author Thomas Pantelis
18  */
19 final class DatastoreInfoMXBeanImpl extends AbstractMXBean implements DatastoreInfoMXBean {
20     private final ActorUtils actorUtils;
21
22     DatastoreInfoMXBeanImpl(final String mxBeanType, final ActorUtils actorUtils) {
23         super("GeneralRuntimeInfo", mxBeanType, null);
24         this.actorUtils = actorUtils;
25     }
26
27     @Override
28     public double getTransactionCreationRateLimit() {
29         return actorUtils.getTxCreationLimit();
30     }
31
32     @Override
33     public long getAskTimeoutExceptionCount() {
34         return actorUtils.getAskTimeoutExceptionCount();
35     }
36
37     @Override
38     public void resetAskTimeoutExceptionCount() {
39         actorUtils.resetAskTimeoutExceptionCount();
40     }
41 }