com.mysql.cj.xdevapi

## Enum Statement.LockContention

- java.lang.Object
- - java.lang.Enum<Statement.LockContention>
  - - com.mysql.cj.xdevapi.Statement.LockContention

All Implemented Interfaces:
  Serializable, Comparable<Statement.LockContention>

Enclosing interface:
  Statement<STMT_T,RES_T>

    public static enum Statement.LockContention
    extends Enum<Statement.LockContention>

The lock contention options for the locking modes available.

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`DEFAULT` Default behavior.
`NOWAIT` Do not wait to acquire row lock.
`SKIP_LOCKED` Do not wait to acquire a row lock.

### Method Summary

All Methods Static Methods Concrete Methods
`static Statement.LockContention` `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static Statement.LockContention[]` `values()` Returns an array containing the constants of this enum type, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### Enum Constant Detail

#### DEFAULT

    public static final Statement.LockContention DEFAULT

Default behavior. Wait until the row lock is released.

#### NOWAIT

    public static final Statement.LockContention NOWAIT

Do not wait to acquire row lock. Fail with an error if a requested row is locked.

#### SKIP_LOCKED

    public static final Statement.LockContention SKIP_LOCKED

Do not wait to acquire a row lock. Remove locked rows from the result set.

### Method Detail

#### values

    public static Statement.LockContention[] values()

Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

    for (Statement.LockContention c : Statement.LockContention.values())
        System.out.println(c);

Returns:
  an array containing the constants of this enum type, in the order they are declared

#### valueOf

    public static Statement.LockContention valueOf(String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum type has no constant with the specified name
  `NullPointerException` - if the argument is null

Copyright © 2016, 2025, Oracle and/or its affiliates.