2 * Copyright (c) 2018 Pantheon Technologies, s.r.o. 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.sal.core.compat;
10 import static java.util.Objects.requireNonNull;
12 import com.google.common.collect.ForwardingObject;
13 import com.google.common.util.concurrent.ListenableFuture;
14 import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort;
16 public class DOMStoreThreePhaseCommitCohortAdapter extends ForwardingObject implements DOMStoreThreePhaseCommitCohort {
17 private final org.opendaylight.mdsal.dom.spi.store.DOMStoreThreePhaseCommitCohort delegate;
19 public DOMStoreThreePhaseCommitCohortAdapter(
20 final org.opendaylight.mdsal.dom.spi.store.DOMStoreThreePhaseCommitCohort delegate) {
21 this.delegate = requireNonNull(delegate);
25 protected org.opendaylight.mdsal.dom.spi.store.DOMStoreThreePhaseCommitCohort delegate() {
30 public ListenableFuture<Void> preCommit() {
31 return delegate.preCommit();
35 public ListenableFuture<Void> commit() {
36 return delegate.commit();
40 public ListenableFuture<Boolean> canCommit() {
41 return delegate.canCommit();
45 public ListenableFuture<Void> abort() {
46 return delegate.abort();