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;
public class DatastoreTestTask {
private final DOMStore store;
- private AsyncDataChangeListener<InstanceIdentifier, NormalizedNode<?, ?>> changeListener;
+ private AsyncDataChangeListener<YangInstanceIdentifier, NormalizedNode<?, ?>> 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;
internalListener = new ChangeEventListener();
}
- public DatastoreTestTask changeListener(final InstanceIdentifier path, final DataChangeScope scope,
- final AsyncDataChangeListener<InstanceIdentifier, NormalizedNode<?, ?>> changeListener) {
+ public DatastoreTestTask changeListener(final YangInstanceIdentifier path, final DataChangeScope scope,
+ final AsyncDataChangeListener<YangInstanceIdentifier, NormalizedNode<?, ?>> 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;
}
}
- public Future<AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>>> getChangeEvent() {
+ public Future<AsyncDataChangeEvent<YangInstanceIdentifier, NormalizedNode<?, ?>>> getChangeEvent() {
return internalListener.receivedChange;
}
}
private final class ChangeEventListener implements
- AsyncDataChangeListener<InstanceIdentifier, NormalizedNode<?, ?>> {
+ AsyncDataChangeListener<YangInstanceIdentifier, NormalizedNode<?, ?>> {
- protected final SettableFuture<AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>>> receivedChange = SettableFuture
+ protected final SettableFuture<AsyncDataChangeEvent<YangInstanceIdentifier, NormalizedNode<?, ?>>> receivedChange = SettableFuture
.create();
@Override
- public void onDataChanged(final AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change) {
+ public void onDataChanged(final AsyncDataChangeEvent<YangInstanceIdentifier, NormalizedNode<?, ?>> 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() {
};
}
- public static final WriteTransactionCustomizer simpleMerge(final InstanceIdentifier path,
+ public static final WriteTransactionCustomizer simpleMerge(final YangInstanceIdentifier path,
final NormalizedNode<?, ?> data) {
return new WriteTransactionCustomizer() {
};
}
- 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) {