Merge "Bug 1236 - Documented Binding-aware RPC services of MD-SAL"
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / ThreePhaseCommitCohortProxy.java
1 /*
2  * Copyright (c) 2014 Cisco 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
9 package org.opendaylight.controller.cluster.datastore;
10
11 import akka.actor.ActorPath;
12 import com.google.common.util.concurrent.ListenableFuture;
13 import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort;
14
15 import java.util.Collections;
16 import java.util.List;
17
18 /**
19  * ThreePhaseCommitCohortProxy represents a set of remote cohort proxies
20  */
21 public class ThreePhaseCommitCohortProxy implements
22     DOMStoreThreePhaseCommitCohort{
23
24     private final List<ActorPath> cohortPaths;
25
26     public ThreePhaseCommitCohortProxy(List<ActorPath> cohortPaths) {
27
28         this.cohortPaths = cohortPaths;
29     }
30
31     @Override public ListenableFuture<Boolean> canCommit() {
32         throw new UnsupportedOperationException("canCommit");
33     }
34
35     @Override public ListenableFuture<Void> preCommit() {
36         throw new UnsupportedOperationException("preCommit");
37     }
38
39     @Override public ListenableFuture<Void> abort() {
40         throw new UnsupportedOperationException("abort");
41     }
42
43     @Override public ListenableFuture<Void> commit() {
44         throw new UnsupportedOperationException("commit");
45     }
46
47     public List<ActorPath> getCohortPaths() {
48         return Collections.unmodifiableList(this.cohortPaths);
49     }
50 }