package org.opendaylight.controller.cluster.datastore.messages;
-import com.google.common.util.concurrent.CheckedFuture;
+import com.google.common.util.concurrent.FluentFuture;
import com.google.common.util.concurrent.SettableFuture;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import org.opendaylight.controller.cluster.datastore.node.utils.stream.SerializationUtils;
-import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
-import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadTransaction;
+import org.opendaylight.mdsal.dom.spi.store.DOMStoreReadTransaction;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
/**
}
@Override
- public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+ public final void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
super.readExternal(in);
- path = SerializationUtils.deserializePath(in);
+ path = SerializationUtils.readPath(in);
}
@Override
- public void writeExternal(ObjectOutput out) throws IOException {
+ public void writeExternal(final ObjectOutput out) throws IOException {
super.writeExternal(out);
- SerializationUtils.serializePath(path, out);
+ SerializationUtils.writePath(out, getStreamVersion(), path);
}
- public AbstractRead<T> asVersion(short version) {
+ public AbstractRead<T> asVersion(final short version) {
return version == getVersion() ? this : newInstance(version);
}
- public abstract CheckedFuture<T, ReadFailedException> apply(DOMStoreReadTransaction readDelegate);
+ public abstract FluentFuture<T> apply(DOMStoreReadTransaction readDelegate);
public abstract void processResponse(Object reponse, SettableFuture<T> promise);