2 * Copyright (c) 2016 Cisco Systems, 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
8 package org.opendaylight.controller.cluster.access.commands;
10 import akka.actor.ActorRef;
11 import org.opendaylight.controller.cluster.access.ABIVersion;
12 import org.opendaylight.controller.cluster.access.concepts.Request;
13 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
16 * Abstract base class for {@link Request}s involving specific transactions local to a member node. These transactions
17 * take advantage of isolation provided by the DataTree, performing transaction modifications on the frontend.
19 * @author Robert Varga
21 * @param <T> Message type
23 abstract class AbstractLocalTransactionRequest<T extends AbstractLocalTransactionRequest<T>> extends TransactionRequest<T> {
24 private static final long serialVersionUID = 1L;
26 AbstractLocalTransactionRequest(final TransactionIdentifier identifier, final ActorRef replyTo) {
27 super(identifier, replyTo);
31 protected final AbstractTransactionRequestProxy<T> externalizableProxy(final ABIVersion version) {
32 throw new UnsupportedOperationException("Local transaction request should never be serialized");
35 @SuppressWarnings("unchecked")
37 protected final T cloneAsVersion(final ABIVersion version) {
38 // These messages cannot be serialized, hence we this method is a no-op