2 * Copyright (c) 2015 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.cluster.datastore.messages;
10 import com.google.common.base.Preconditions;
11 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification;
14 * Message notifying the shard leader to apply modifications which have been
15 * prepared locally against its DataTree. This message is not directly serializable,
16 * simply because the leader and sender need to be on the same system.
18 public final class ReadyLocalTransaction {
19 private final DataTreeModification modification;
20 private final String transactionID;
21 private final boolean doCommitOnReady;
23 public ReadyLocalTransaction(final String transactionID, DataTreeModification modification, boolean doCommitOnReady) {
24 this.transactionID = Preconditions.checkNotNull(transactionID);
25 this.modification = Preconditions.checkNotNull(modification);
26 this.doCommitOnReady = doCommitOnReady;
29 public String getTransactionID() {
33 public DataTreeModification getModification() {
37 public boolean isDoCommitOnReady() {
38 return doCommitOnReady;