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.mdsal.common.api;
10 import com.google.common.annotations.Beta;
11 import com.google.common.util.concurrent.FluentFuture;
12 import org.eclipse.jdt.annotation.NonNullByDefault;
15 * Base interface for tagging information about a successful commit. This can include various ways of identifying
16 * the resulting changeset, timing information or any other piece of data about the commit itself the implementation
17 * deems interesting to the client.
19 * @author Robert Varga
23 public interface CommitInfo {
25 * Return an empty {@link CommitInfo}.
27 * @return An empty {@link CommitInfo} instance.
29 static CommitInfo empty() {
30 return EmptyCommitInfo.INSTANCE;
34 * Return an immediately-completed empty {@link CommitInfo} future.
36 * @return An empty {@link CommitInfo} instance enclosed in a completed future.
38 static FluentFuture<CommitInfo> emptyFluentFuture() {
39 return EmptyCommitInfo.FLUENT_INSTANCE;