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;
19 * Structure obtained during first phase commit, contains destroyed modules from
20 * previous transactions that need to be closed and all committed modules with
24 public class CommitInfo {
25 private final List<DestroyedModule> destroyedFromPreviousTransactions;
26 private final Map<ModuleIdentifier, ModuleInternalTransactionalInfo> commitMap;
28 public CommitInfo(List<DestroyedModule> destroyedFromPreviousTransactions,
29 Map<ModuleIdentifier, ModuleInternalTransactionalInfo> commitMap) {
30 this.destroyedFromPreviousTransactions = Collections
31 .unmodifiableList(destroyedFromPreviousTransactions);
32 this.commitMap = Collections.unmodifiableMap(commitMap);
36 * Get ordered list of modules that can be closed in the same order, i.e.
37 * first element will be a leaf on which no other module depends, n-th
38 * element can only have dependencies with index smaller than n.
40 public List<DestroyedModule> getDestroyedFromPreviousTransactions() {
41 return destroyedFromPreviousTransactions;
44 public Map<ModuleIdentifier, ModuleInternalTransactionalInfo> getCommitted() {