267a7d37f4d7bb2f01b6ba030acb5cb5f8a13bcc
[mdsal.git] / common / mdsal-common-api / src / main / java / org / opendaylight / mdsal / common / api / EmptyCommitInfo.java
1 /*
2  * Copyright (c) 2018 Pantheon Technologies, s.r.o. 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.mdsal.common.api;
9
10 import com.google.common.util.concurrent.FluentFuture;
11 import org.eclipse.jdt.annotation.NonNullByDefault;
12 import org.opendaylight.yangtools.util.concurrent.FluentFutures;
13
14 /**
15  * Empty commit info singleton. Useful when {@link AsyncWriteTransaction#commit()} has nothing more to say.
16  *
17  * @author Robert Varga
18  */
19 @NonNullByDefault
20 final class EmptyCommitInfo implements CommitInfo {
21     static final CommitInfo INSTANCE = new EmptyCommitInfo();
22     static final FluentFuture<CommitInfo> FLUENT_INSTANCE = FluentFutures.immediateFluentFuture(INSTANCE);
23
24     private EmptyCommitInfo() {
25         // Hidden
26     }
27 }