2 * Copyright (c) 2015 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.controller.cluster.datastore;
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;
15 * Implementation of DatastoreInfoMXBean.
17 * @author Thomas Pantelis
19 final class DatastoreInfoMXBeanImpl extends AbstractMXBean implements DatastoreInfoMXBean {
20 private final ActorUtils actorUtils;
22 DatastoreInfoMXBeanImpl(final String mxBeanType, final ActorUtils actorUtils) {
23 super("GeneralRuntimeInfo", mxBeanType, null);
24 this.actorUtils = actorUtils;
28 public double getTransactionCreationRateLimit() {
29 return actorUtils.getTxCreationLimit();
33 public long getAskTimeoutExceptionCount() {
34 return actorUtils.getAskTimeoutExceptionCount();
38 public void resetAskTimeoutExceptionCount() {
39 actorUtils.resetAskTimeoutExceptionCount();