Enum AccessType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<AccessType>

    public enum AccessType
    extends java.lang.Enum<AccessType>
    The types of access strategies available.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      NONSTRICT_READ_WRITE
      Read and write access (non-strict).
      READ_ONLY
      Read-only access.
      READ_WRITE
      Read and write access (strict).
      TRANSACTIONAL
      A read and write strategy where isolation/locking is maintained in conjunction with a JTA transaction.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static AccessType fromExternalName​(java.lang.String externalName)
      Resolve an AccessType from its external name.
      java.lang.String getExternalName()
      Get the corresponding externalized name for this value.
      java.lang.String toString()  
      static AccessType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static AccessType[] 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, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • READ_ONLY

        public static final AccessType READ_ONLY
        Read-only access. Data may be added and removed, but not mutated.
      • READ_WRITE

        public static final AccessType READ_WRITE
        Read and write access (strict). Data may be added, removed and mutated.
      • NONSTRICT_READ_WRITE

        public static final AccessType NONSTRICT_READ_WRITE
        Read and write access (non-strict). Data may be added, removed and mutated. The non-strictness comes from the fact that locks are not maintained as tightly as in READ_WRITE, which leads to better throughput but may also lead to inconsistencies.
      • TRANSACTIONAL

        public static final AccessType TRANSACTIONAL
        A read and write strategy where isolation/locking is maintained in conjunction with a JTA transaction.
    • Method Detail

      • values

        public static AccessType[] 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 (AccessType c : AccessType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static AccessType valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getExternalName

        public java.lang.String getExternalName()
        Get the corresponding externalized name for this value.
        Returns:
        The corresponding externalized name.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<AccessType>
      • fromExternalName

        public static AccessType fromExternalName​(java.lang.String externalName)
        Resolve an AccessType from its external name.
        Parameters:
        externalName - The external representation to resolve
        Returns:
        The access type.
        Throws:
        UnknownAccessTypeException - If the externalName was not recognized.
        See Also:
        getExternalName()