2 * Copyright © 2024 Smartoptics 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
9 package org.opendaylight.transportpce.renderer.provisiondevice.transaction.history;
11 import java.util.List;
12 import org.opendaylight.transportpce.renderer.provisiondevice.transaction.Transaction;
13 import org.opendaylight.transportpce.renderer.provisiondevice.transaction.delete.Delete;
15 public interface History {
21 * Only accepts the transaction if this History
22 * object doesn't already contain the object.
24 * @return true if the transaction was added.
26 boolean add(Transaction transaction);
29 * A list of transactions.
32 * Will only accept unique transactions.
33 * @return true if all transactions was added. false if one or more transactions was rejected.
35 boolean add(List<Transaction> transactions);
38 * Add an array of interface transactions.
41 * Duplicate interface ids, null or empty strings
42 * are silently ignored.
43 * @return may return false
45 boolean addInterfaces(String nodeId, String interfaceId);
48 * Add an array of interface transactions.
51 * Duplicate interface ids, null or empty strings
52 * are silently ignored.
53 * @return may return false
55 boolean addInterfaces(String nodeId, String[] interfaceIds);
58 * Add a list of interface transactions.
61 * Duplicate interface ids, null or empty strings
62 * are silently ignored.
64 boolean addInterfaces(String nodeId, List<String> interfaceIds);
67 * Rollback all transactions.
70 * Typically, the transactions are rolled back in reverse
71 * order, but the implementing class may choose a different
74 boolean rollback(Delete delete);