Enum Class CacheMode

java.lang.Object
java.lang.Enum<CacheMode>
org.infinispan.configuration.cache.CacheMode
All Implemented Interfaces:
Serializable, Comparable<CacheMode>, Constable

public enum CacheMode extends Enum<CacheMode>
Cache replication mode.
  • Enum Constant Details

    • LOCAL

      @ProtoEnumValue(number=0) public static final CacheMode LOCAL
      Data is not replicated.
    • REPL_SYNC

      @ProtoEnumValue(number=1) public static final CacheMode REPL_SYNC
      Data replicated synchronously.
    • REPL_ASYNC

      @ProtoEnumValue(number=2) public static final CacheMode REPL_ASYNC
      Data replicated asynchronously.
    • INVALIDATION_SYNC

      @ProtoEnumValue(number=3) public static final CacheMode INVALIDATION_SYNC
      Data invalidated synchronously.
    • INVALIDATION_ASYNC

      @ProtoEnumValue(number=4) public static final CacheMode INVALIDATION_ASYNC
      Data invalidated asynchronously.
    • DIST_SYNC

      @ProtoEnumValue(number=5) public static final CacheMode DIST_SYNC
      Synchronous DIST
    • DIST_ASYNC

      @ProtoEnumValue(number=6) public static final CacheMode DIST_ASYNC
      Async DIST
  • Method Details

    • values

      public static CacheMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CacheMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • valueOf

      public static CacheMode valueOf(int order)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      order - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • of

      public static CacheMode of(CacheType cacheType, boolean sync)
    • isInvalidation

      public boolean isInvalidation()
      Returns true if the mode is invalidation, either sync or async.
    • isSynchronous

      public boolean isSynchronous()
    • isClustered

      public boolean isClustered()
    • isDistributed

      public boolean isDistributed()
    • isReplicated

      public boolean isReplicated()
    • needsStateTransfer

      public boolean needsStateTransfer()
    • toSync

      public CacheMode toSync()
    • toSync

      public CacheMode toSync(boolean sync)
    • toAsync

      public CacheMode toAsync()
    • friendlyCacheModeString

      public String friendlyCacheModeString()
    • toCacheType

      public String toCacheType()
    • toElement

      public Element toElement(boolean template)
    • cacheType

      public CacheType cacheType()