*/
package org.opendaylight.controller.cluster.notifications;
-import com.google.common.base.Preconditions;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
+import static java.util.Objects.requireNonNull;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
/**
* A local message initiated internally from the RaftActor when some state of a leader has changed.
private final String leaderId;
private final short leaderPayloadVersion;
- public LeaderStateChanged(@Nonnull String memberId, @Nullable String leaderId, short leaderPayloadVersion) {
- this.memberId = Preconditions.checkNotNull(memberId);
+ public LeaderStateChanged(@NonNull String memberId, @Nullable String leaderId, short leaderPayloadVersion) {
+ this.memberId = requireNonNull(memberId);
this.leaderId = leaderId;
this.leaderPayloadVersion = leaderPayloadVersion;
}
- public @Nonnull String getMemberId() {
+ public @NonNull String getMemberId() {
return memberId;
}