Bug 2038: Ensure only one concurrent 3-phase commit in Shard
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / ForwardedReadyTransaction.java
1 /*
2  * Copyright (c) 2014 Brocade Communications Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.cluster.datastore.messages;
9
10 import org.opendaylight.controller.cluster.datastore.modification.Modification;
11 import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort;
12
13 /**
14  * Transaction ReadyTransaction message that is forwarded to the local Shard from the ShardTransaction.
15  *
16  * @author Thomas Pantelis
17  */
18 public class ForwardedReadyTransaction {
19     private final String transactionID;
20     private final DOMStoreThreePhaseCommitCohort cohort;
21     private final Modification modification;
22
23     public ForwardedReadyTransaction(String transactionID, DOMStoreThreePhaseCommitCohort cohort,
24             Modification modification) {
25         this.transactionID = transactionID;
26         this.cohort = cohort;
27         this.modification = modification;
28     }
29
30     public String getTransactionID() {
31         return transactionID;
32     }
33
34     public DOMStoreThreePhaseCommitCohort getCohort() {
35         return cohort;
36     }
37
38     public Modification getModification() {
39         return modification;
40     }
41 }