2 * Copyright (c) 2013 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.config.util;
10 import javax.management.Attribute;
11 import javax.management.InstanceNotFoundException;
12 import javax.management.ObjectName;
14 import org.opendaylight.controller.config.api.ConflictingVersionException;
15 import org.opendaylight.controller.config.api.ValidationException;
16 import org.opendaylight.controller.config.api.jmx.CommitStatus;
17 import org.opendaylight.controller.config.api.jmx.ConfigTransactionControllerMXBean;
19 public interface ConfigTransactionClient extends
20 ConfigTransactionControllerMXBean {
22 CommitStatus commit() throws ConflictingVersionException,
25 void assertVersion(int expectedParentVersion, int expectedCurrentVersion);
27 long getParentVersion();
31 ObjectName getObjectName();
33 void validateBean(ObjectName configBeanON) throws ValidationException;
37 * Use {@link #destroyModule(String, String)}
39 void destroyConfigBean(String moduleName, String instanceName) throws InstanceNotFoundException;
41 void destroyModule(String moduleName, String instanceName) throws InstanceNotFoundException;
43 void setAttribute(ObjectName on, String jmxName, Attribute attribute);
46 * Get the attribute named jmxName from the Object with ObjectName on
48 * @param on - ObjectName of the Object from which the attribute should be read
49 * @param jmxName - name of the attribute to be read
51 * @return Attribute of Object on with attribute name jmxName
53 Attribute getAttribute(ObjectName on, String jmxName);