2 * Copyright (c) 2014 Cisco 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.jmx.mbeans.shard;
12 * Factory for creating ShardStats mbeans.
14 * @author Basheeruddin syedbahm@cisco.com
16 public class ShardMBeanFactory {
18 public static ShardStats getShardStatsMBean(final String shardName, final String mxBeanType) {
19 String finalMXBeanType = mxBeanType != null ? mxBeanType : "DistDataStore";
20 ShardStats shardStatsMBeanImpl = new ShardStats(shardName, finalMXBeanType);
21 shardStatsMBeanImpl.registerMBean();
22 return shardStatsMBeanImpl;