1 package org.opendaylight.controller.md.sal.common.api.data;
3 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
4 import org.opendaylight.yangtools.yang.common.RpcError.ErrorType;
8 * Failure of asynchronous transaction commit caused by failure
9 * of optimistic locking.
11 * This exception is raised and returned when transaction commit
12 * failed, because other transaction finished successfully
13 * and modified same data as failed transaction.
15 * Clients may recover from this error condition by
16 * retrieving current state and submitting new updated
20 public class OptimisticLockFailedException extends TransactionCommitFailedException {
22 private static final long serialVersionUID = 1L;
24 public OptimisticLockFailedException(final String message, final Throwable cause) {
25 super(message, cause, RpcResultBuilder.newError(ErrorType.APPLICATION, "resource-denied",
26 message, null, null, cause));
29 public OptimisticLockFailedException(final String message) {