* 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.clustering.it.provider.impl;
+import static com.google.common.base.Preconditions.checkState;
import static org.opendaylight.controller.clustering.it.provider.impl.AbstractTransactionHandler.ITEM;
-import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.SettableFuture;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.Collection;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
-import javax.annotation.Nonnull;
-import org.opendaylight.controller.md.sal.dom.api.ClusteredDOMDataTreeChangeListener;
+import org.opendaylight.mdsal.dom.api.ClusteredDOMDataTreeChangeListener;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
private final AtomicLong lastNotifTimestamp = new AtomicLong(0);
private ScheduledExecutorService executorService;
private ScheduledFuture<?> scheduledFuture;
- private final AtomicBoolean loggedIgnoredNotificationDiff = new AtomicBoolean();
@Override
- public void onDataTreeChanged(@Nonnull final Collection<DataTreeCandidate> changes) {
+ public void onDataTreeChanged(final Collection<DataTreeCandidate> changes) {
// There should only be one candidate reported
- Preconditions.checkState(changes.size() == 1);
+ checkState(changes.size() == 1);
lastNotifTimestamp.set(System.nanoTime());
? change.getRootNode().getDataBefore().get() : "",
change.getRootNode().getDataAfter().get());
- if (localCopy == null || checkEqual(change.getRootNode().getDataBefore().get())) {
- localCopy = change.getRootNode().getDataAfter().get();
- } else {
- LOG.warn("Ignoring notification {}", loggedIgnoredNotificationDiff.compareAndSet(false, true)
- ? diffWithLocalCopy(change.getRootNode().getDataBefore().get()) : "");
- LOG.trace("Ignored notification content: {}", change);
- }
+ localCopy = change.getRootNode().getDataAfter().get();
} else {
LOG.warn("getDataAfter() is missing from notification. change: {}", change);
}