Adjust Tx rate limiter for unused transactions
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / jmx / mbeans / 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.jmx.mbeans;
9
10 import org.opendaylight.controller.cluster.datastore.utils.ActorContext;
11 import org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean;
12
13 /**
14  * Implementation of DatastoreInfoMXBean.
15  *
16  * @author Thomas Pantelis
17  */
18 public class DatastoreInfoMXBeanImpl extends AbstractMXBean implements DatastoreInfoMXBean {
19
20     private final ActorContext actorContext;
21
22     public DatastoreInfoMXBeanImpl(String mxBeanType, ActorContext actorContext) {
23         super("GeneralRuntimeInfo", mxBeanType, null);
24         this.actorContext = actorContext;
25     }
26
27
28     @Override
29     public double getTransactionCreationRateLimit() {
30         return actorContext.getTxCreationLimit();
31     }
32 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.