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.Collections;
11 import java.util.List;
14 import javax.annotation.concurrent.Immutable;
16 import org.opendaylight.controller.config.api.ModuleIdentifier;
17 import org.opendaylight.controller.config.manager.impl.dependencyresolver.DestroyedModule;
18 import org.opendaylight.controller.config.manager.impl.dependencyresolver.ModuleInternalTransactionalInfo;
21 * Structure obtained during first phase commit, contains destroyed modules from
22 * previous transactions that need to be closed and all committed modules with
26 public class CommitInfo {
27 private final List<DestroyedModule> destroyedFromPreviousTransactions;
28 private final Map<ModuleIdentifier, ModuleInternalTransactionalInfo> commitMap;
30 public CommitInfo(List<DestroyedModule> destroyedFromPreviousTransactions,
31 Map<ModuleIdentifier, ModuleInternalTransactionalInfo> commitMap) {
32 this.destroyedFromPreviousTransactions = Collections
33 .unmodifiableList(destroyedFromPreviousTransactions);
34 this.commitMap = Collections.unmodifiableMap(commitMap);
38 * Get ordered list of modules that can be closed in the same order, i.e.
39 * first element will be a leaf on which no other module depends, n-th
40 * element can only have dependencies with index smaller than n.
42 public List<DestroyedModule> getDestroyedFromPreviousTransactions() {
43 return destroyedFromPreviousTransactions;
46 public Map<ModuleIdentifier, ModuleInternalTransactionalInfo> getCommitted() {