org.axonframework.contextsupport.spring
Enum LockingStrategy

java.lang.Object
  extended by java.lang.Enum<LockingStrategy>
      extended by org.axonframework.contextsupport.spring.LockingStrategy
All Implemented Interfaces:
Serializable, Comparable<LockingStrategy>

public enum LockingStrategy
extends Enum<LockingStrategy>

Enum indicating possible locking strategies for repositories.

Since:
2.0
Author:
Allard Buijze

Enum Constant Summary
NO_LOCKING
          Represents the Null Lock Manager (no locking)
OPTIMISTIC
          Represents the Optimistic Lock Manager
PESSIMISTIC
          Represents the Pessimistic Lock Manager
 
Method Summary
 Class<? extends LockManager> getLockManagerType()
          Returns the type of LockManager that belongs to this strategy.
static LockingStrategy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static LockingStrategy[] 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

OPTIMISTIC

public static final LockingStrategy OPTIMISTIC
Represents the Optimistic Lock Manager


PESSIMISTIC

public static final LockingStrategy PESSIMISTIC
Represents the Pessimistic Lock Manager


NO_LOCKING

public static final LockingStrategy NO_LOCKING
Represents the Null Lock Manager (no locking)

Method Detail

values

public static LockingStrategy[] 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 (LockingStrategy c : LockingStrategy.values())
    System.out.println(c);

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

valueOf

public static LockingStrategy 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

getLockManagerType

public Class<? extends LockManager> getLockManagerType()
Returns the type of LockManager that belongs to this strategy.

Returns:
the type of LockManager that belongs to this strategy


Copyright © 2010-2016. All Rights Reserved.