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.manager.impl;
10 import java.util.List;
12 import javax.management.InstanceAlreadyExistsException;
13 import javax.management.ObjectName;
15 import org.opendaylight.controller.config.api.ModuleIdentifier;
16 import org.opendaylight.controller.config.api.ValidationException;
19 * Defines contract between {@link ConfigTransactionControllerImpl} (producer)
20 * and {@link ConfigRegistryImpl} (consumer).
22 interface ConfigTransactionControllerInternal extends
23 ConfigTransactionControllerImplMXBean {
26 * Copy already committed module to current transaction.
28 void copyExistingModule(ModuleInternalInfo oldConfigBeanInfo)
29 throws InstanceAlreadyExistsException;
32 * Call {@link org.opendaylight.controller.config.spi.Module#validate()} on
33 * all beans in transaction. Lock transaction after successful validation.
34 * This method can be called multiple times if validation fails, but cannot
35 * be called after it did not throw exception.
37 * @throws {@link RuntimeException} if validation fails. It is safe to run
38 * this method in future
41 CommitInfo validateBeforeCommitAndLockTransaction()
42 throws ValidationException;
45 * Call {@link org.opendaylight.controller.config.spi.Module#getInstance()}
46 * on all beans in transaction. This method can be only called once.
48 * @throws {@link RuntimeException} commit fails, indicates bug in config
50 * @return ordered list of module identifiers that respects dependency
53 List<ModuleIdentifier> secondPhaseCommit();
56 * @return ObjectName of this transaction controller
58 ObjectName getControllerObjectName();
61 * @return true iif transaction was committed or aborted.