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 com.google.common.annotations.Beta;
12 import javax.annotation.Nonnull;
13 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
16 * Request to abort a local transaction. Since local transactions do not introduce state on the backend until they
17 * are ready, the purpose of this message is to inform the backend that a message identifier has been used. This is
18 * not important for single transactions, but is critical to ensure transaction ordering within local histories.
20 * @author Robert Varga
23 public final class AbortLocalTransactionRequest extends AbstractLocalTransactionRequest<AbortLocalTransactionRequest> {
24 private static final long serialVersionUID = 1L;
26 public AbortLocalTransactionRequest(final @Nonnull TransactionIdentifier identifier, final long sequence,
27 final @Nonnull ActorRef replyTo) {
28 this(identifier, sequence, 0, replyTo);
31 AbortLocalTransactionRequest(final @Nonnull TransactionIdentifier identifier, final long sequence,
32 final long retry, final @Nonnull ActorRef replyTo) {
33 super(identifier, sequence, retry, replyTo);
36 private AbortLocalTransactionRequest(final @Nonnull AbortLocalTransactionRequest request, final long retry) {
37 super(request, retry);
41 protected AbortLocalTransactionRequest cloneAsRetry(final long retry) {
42 return new AbortLocalTransactionRequest(this, retry);