*/
package org.opendaylight.controller.cluster.access.client;
+import static java.util.Objects.requireNonNull;
+
import akka.persistence.DeleteSnapshotsFailure;
import akka.persistence.DeleteSnapshotsSuccess;
import akka.persistence.SaveSnapshotFailure;
import akka.persistence.SaveSnapshotSuccess;
import akka.persistence.SnapshotSelectionCriteria;
-import com.google.common.base.Preconditions;
import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
SavingClientActorBehavior(final InitialClientActorContext context, final ClientIdentifier nextId) {
super(context);
- this.myId = Preconditions.checkNotNull(nextId);
+ this.myId = requireNonNull(nextId);
}
@Override
} else if (command instanceof SaveSnapshotSuccess) {
LOG.debug("{}: got command: {}", persistenceId(), command);
SaveSnapshotSuccess saved = (SaveSnapshotSuccess)command;
- context().deleteSnapshots(new SnapshotSelectionCriteria(saved.metadata().sequenceNr(),
+ context().deleteSnapshots(new SnapshotSelectionCriteria(scala.Long.MaxValue(),
saved.metadata().timestamp() - 1, 0L, 0L));
return this;
} else if (command instanceof DeleteSnapshotsSuccess) {