X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-inmemory-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fstore%2Fimpl%2FDatastoreTestTask.java;h=26987a6fba6426169ee7df98340c8ac0f0f4be47;hp=8ac93b180437a7193bbe6e466ed0f1c7567aa9f3;hb=de3e413b633b7555ae8f3fe2ec163dbb7dda5da8;hpb=a9533db1d57a2729772ee192a2f96d358c71bede diff --git a/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/DatastoreTestTask.java b/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/DatastoreTestTask.java index 8ac93b1804..26987a6fba 100644 --- a/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/DatastoreTestTask.java +++ b/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/DatastoreTestTask.java @@ -20,7 +20,7 @@ import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadTransaction; import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadWriteTransaction; import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort; import org.opendaylight.yangtools.concepts.ListenerRegistration; -import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import com.google.common.base.Preconditions; @@ -29,13 +29,13 @@ import com.google.common.util.concurrent.SettableFuture; public class DatastoreTestTask { private final DOMStore store; - private AsyncDataChangeListener> changeListener; + private AsyncDataChangeListener> changeListener; private WriteTransactionCustomizer setup; private WriteTransactionCustomizer write; private ReadTransactionVerifier read; private WriteTransactionCustomizer cleanup; - private InstanceIdentifier changePath; + private YangInstanceIdentifier changePath; private DataChangeScope changeScope; private boolean postSetup = false; private final ChangeEventListener internalListener; @@ -45,15 +45,15 @@ public class DatastoreTestTask { internalListener = new ChangeEventListener(); } - public DatastoreTestTask changeListener(final InstanceIdentifier path, final DataChangeScope scope, - final AsyncDataChangeListener> changeListener) { + public DatastoreTestTask changeListener(final YangInstanceIdentifier path, final DataChangeScope scope, + final AsyncDataChangeListener> changeListener) { this.changeListener = changeListener; this.changePath = path; this.changeScope = scope; return this; } - public DatastoreTestTask changeListener(final InstanceIdentifier path, final DataChangeScope scope) { + public DatastoreTestTask changeListener(final YangInstanceIdentifier path, final DataChangeScope scope) { this.changePath = path; this.changeScope = scope; return this; @@ -105,7 +105,7 @@ public class DatastoreTestTask { } } - public Future>> getChangeEvent() { + public Future>> getChangeEvent() { return internalListener.receivedChange; } @@ -128,20 +128,20 @@ public class DatastoreTestTask { } private final class ChangeEventListener implements - AsyncDataChangeListener> { + AsyncDataChangeListener> { - protected final SettableFuture>> receivedChange = SettableFuture + protected final SettableFuture>> receivedChange = SettableFuture .create(); @Override - public void onDataChanged(final AsyncDataChangeEvent> change) { + public void onDataChanged(final AsyncDataChangeEvent> change) { if (postSetup) { receivedChange.set(change); } } } - public static final WriteTransactionCustomizer simpleWrite(final InstanceIdentifier path, + public static final WriteTransactionCustomizer simpleWrite(final YangInstanceIdentifier path, final NormalizedNode data) { return new WriteTransactionCustomizer() { @@ -152,7 +152,7 @@ public class DatastoreTestTask { }; } - public static final WriteTransactionCustomizer simpleMerge(final InstanceIdentifier path, + public static final WriteTransactionCustomizer simpleMerge(final YangInstanceIdentifier path, final NormalizedNode data) { return new WriteTransactionCustomizer() { @@ -163,7 +163,7 @@ public class DatastoreTestTask { }; } - public static final WriteTransactionCustomizer simpleDelete(final InstanceIdentifier path) { + public static final WriteTransactionCustomizer simpleDelete(final YangInstanceIdentifier path) { return new WriteTransactionCustomizer() { @Override public void customize(final DOMStoreReadWriteTransaction tx) {