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 java.io.Serial;
12 import org.opendaylight.controller.cluster.access.ABIVersion;
13 import org.opendaylight.controller.cluster.access.concepts.Request;
14 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
17 * Abstract base class for {@link Request}s involving specific transactions local to a member node. These transactions
18 * take advantage of isolation provided by the DataTree, performing transaction modifications on the frontend.
20 * @author Robert Varga
22 * @param <T> Message type
24 public abstract class AbstractLocalTransactionRequest<T extends AbstractLocalTransactionRequest<T>>
25 extends TransactionRequest<T> {
27 private static final long serialVersionUID = 1L;
29 AbstractLocalTransactionRequest(final TransactionIdentifier identifier, final long sequence,
30 final ActorRef replyTo) {
31 super(identifier, sequence, replyTo);
35 protected final AbstractTransactionRequestProxy<T> externalizableProxy(final ABIVersion version) {
36 throw new UnsupportedOperationException("Local transaction request " + this + " should never be serialized");
39 @SuppressWarnings("unchecked")
41 protected final T cloneAsVersion(final ABIVersion version) {
42 // These messages cannot be serialized, hence we this method is a no-op