2 * Copyright (c) 2015 Huawei, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.cluster.datastore.messages;
11 import com.google.common.util.concurrent.CheckedFuture;
12 import com.google.common.util.concurrent.SettableFuture;
13 import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
14 import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadTransaction;
15 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
18 * Abstract base class for ReadData and DataExists messages.
23 public abstract class AbstractRead<T> implements SerializableMessage {
24 private final YangInstanceIdentifier path;
26 public AbstractRead(final YangInstanceIdentifier path) {
30 public YangInstanceIdentifier getPath() {
34 public abstract CheckedFuture<T, ReadFailedException> apply(DOMStoreReadTransaction readDelegate);
36 public abstract void processResponse(Object reponse, SettableFuture<T> promise);