All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opendaylight.controller.cluster.access.commands.AbstractLocalTransactionRequest Maven / Gradle / Ivy

There is a newer version: 10.0.4
Show newest version
/*
 * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */
package org.opendaylight.controller.cluster.access.commands;

import akka.actor.ActorRef;
import org.opendaylight.controller.cluster.access.ABIVersion;
import org.opendaylight.controller.cluster.access.concepts.Request;
import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;

/**
 * Abstract base class for {@link Request}s involving specific transactions local to a member node. These transactions
 * take advantage of isolation provided by the DataTree, performing transaction modifications on the frontend.
 *
 * @author Robert Varga
 *
 * @param  Message type
 */
public abstract class AbstractLocalTransactionRequest>
        extends TransactionRequest {
    @java.io.Serial
    private static final long serialVersionUID = 1L;

    AbstractLocalTransactionRequest(final TransactionIdentifier identifier, final long sequence,
            final ActorRef replyTo) {
        super(identifier, sequence, replyTo);
    }

    @Override
    protected final SerialForm externalizableProxy(final ABIVersion version) {
        throw new UnsupportedOperationException("Local transaction request " + this + " should never be serialized");
    }

    @SuppressWarnings("unchecked")
    @Override
    protected final T cloneAsVersion(final ABIVersion version) {
        // These messages cannot be serialized, hence we this method is a no-op
        return (T)this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy