Fix checkstyle violations in sal-dom-spi
[controller.git] / opendaylight / md-sal / sal-dom-spi / src / main / java / org / opendaylight / controller / sal / core / spi / data / ForwardingDOMStoreThreePhaseCommitCohort.java
1 /*
2  * Copyright (c) 2015 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 package org.opendaylight.controller.sal.core.spi.data;
9
10 import com.google.common.annotations.Beta;
11 import com.google.common.collect.ForwardingObject;
12 import com.google.common.util.concurrent.ListenableFuture;
13
14 /**
15  * Abstract base class for {@link DOMStoreThreePhaseCommitCohort} implementations,
16  * which forward most of their functionality to a backend {@link #delegate()}.
17  */
18 @Beta
19 public abstract class ForwardingDOMStoreThreePhaseCommitCohort extends ForwardingObject
20         implements DOMStoreThreePhaseCommitCohort {
21     @Override
22     protected abstract DOMStoreThreePhaseCommitCohort delegate();
23
24     @Override
25     public ListenableFuture<Boolean> canCommit() {
26         return delegate().canCommit();
27     }
28
29     @Override
30     public ListenableFuture<Void> preCommit() {
31         return delegate().preCommit();
32     }
33
34     @Override
35     public ListenableFuture<Void> abort() {
36         return delegate().abort();
37     }
38
39     @Override
40     public ListenableFuture<Void> commit() {
41         return delegate().commit();
42     }
43 }