org.infinispan.transaction
Enum TransactionMode
java.lang.Object
java.lang.Enum<TransactionMode>
org.infinispan.transaction.TransactionMode
- All Implemented Interfaces:
- Serializable, Comparable<TransactionMode>
public enum TransactionMode
- extends Enum<TransactionMode>
Enumeration containing the available transaction modes for a cache.
Starting with Infinispan version 5.1 a cache doesn't support mixed access:
i.e. won't support transactional and non-transactional operations.
A cache is transactional if one the following:
- a transactionManagerLookup is configured for the cache
- batching is enabled
- it is explicitly marked as transactional: config.fluent().transaction().transactionMode(TransactionMode.TRANSACTIONAL).
In this last case a transactionManagerLookup needs to be explicitly set
By default a cache is not transactional.
- Since:
- 5.1
- Author:
- Mircea Markus
Method Summary |
static TransactionMode |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static TransactionMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared. |
NON_TRANSACTIONAL
public static final TransactionMode NON_TRANSACTIONAL
TRANSACTIONAL
public static final TransactionMode TRANSACTIONAL
values
public static TransactionMode[] 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 (TransactionMode c : TransactionMode.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static TransactionMode 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 © 2012 JBoss, a division of Red Hat. All Rights Reserved.