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 public abstract class AbstractLocalTransactionRequest<T extends AbstractLocalTransactionRequest<T>>
24 extends TransactionRequest<T> {
25 private static final long serialVersionUID = 1L;
27 AbstractLocalTransactionRequest(final TransactionIdentifier identifier, final long sequence,
28 final ActorRef replyTo) {
29 super(identifier, sequence, replyTo);
33 protected final AbstractTransactionRequestProxy<T> externalizableProxy(final ABIVersion version) {
34 throw new UnsupportedOperationException("Local transaction request " + this + " should never be serialized");
37 @SuppressWarnings("unchecked")
39 protected final T cloneAsVersion(final ABIVersion version) {
40 // These messages cannot be serialized, hence we this method is a no-op