X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2FReplicatedLog.java;h=095e85cbe568ca3935c9a977af73c0564dea9370;hb=b4bf55727093657662d8c16a50fa85f87978a586;hp=71576f6d21b71fd02704e50d74e431f16a641f50;hpb=9d4ff4c4045fdef38e3940d336d2825df29c4d65;p=controller.git diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ReplicatedLog.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ReplicatedLog.java index 71576f6d21..095e85cbe5 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ReplicatedLog.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ReplicatedLog.java @@ -5,13 +5,12 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.controller.cluster.raft; import akka.japi.Procedure; import java.util.List; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; /** * Represents the ReplicatedLog that needs to be kept in sync by the RaftActor. @@ -26,16 +25,14 @@ public interface ReplicatedLog { * @return the ReplicatedLogEntry if found, otherwise null if the adjusted index less than 0 or * greater than the size of the in-memory journal */ - @Nullable - ReplicatedLogEntry get(long index); + @Nullable ReplicatedLogEntry get(long index); /** * Return the last replicated log entry in the log or null of not found. * * @return the last replicated log entry in the log or null of not found. */ - @Nullable - ReplicatedLogEntry last(); + @Nullable ReplicatedLogEntry last(); /** * Return the index of the last entry in the log or -1 if the log is empty. @@ -97,7 +94,7 @@ public interface ReplicatedLog { * delivered after persistence is complete and the associated callback is executed. * @return true if the entry was successfully appended, false otherwise. */ - boolean appendAndPersist(@Nonnull ReplicatedLogEntry replicatedLogEntry, + boolean appendAndPersist(@NonNull ReplicatedLogEntry replicatedLogEntry, @Nullable Procedure callback, boolean doAsync); /** @@ -106,7 +103,7 @@ public interface ReplicatedLog { * @param index the index of the first log entry to get. * @return the List of entries */ - @Nonnull List getFrom(long index); + @NonNull List getFrom(long index); /** * Returns a list of log entries starting from the given index up to the given maximum of entries or @@ -117,7 +114,7 @@ public interface ReplicatedLog { * @param maxDataSize the maximum accumulated size of the log entries to get * @return the List of entries meeting the criteria. */ - @Nonnull List getFrom(long index, int maxEntries, long maxDataSize); + @NonNull List getFrom(long index, int maxEntries, long maxDataSize); /** * Returns the number of entries in the journal.