Enum 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 Detail

      • 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
      • isTransactional

        public boolean isTransactional()