org.infinispan.configuration.cache
Enum CacheMode

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

public enum CacheMode
extends Enum<CacheMode>

Cache replication mode.


Enum Constant Summary
DIST_ASYNC
          Async DIST
DIST_SYNC
          Synchronous DIST
INVALIDATION_ASYNC
          Data invalidated asynchronously.
INVALIDATION_SYNC
          Data invalidated synchronously.
LOCAL
          Data is not replicated.
REPL_ASYNC
          Data replicated asynchronously.
REPL_SYNC
          Data replicated synchronously.
 
Method Summary
 String friendlyCacheModeString()
           
 boolean isClustered()
           
 boolean isDistributed()
           
 boolean isInvalidation()
          Returns true if the mode is invalidation, either sync or async.
 boolean isReplicated()
           
 boolean isSynchronous()
           
 CacheMode toAsync()
           
 CacheMode toSync()
           
static CacheMode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CacheMode[] 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

LOCAL

public static final CacheMode LOCAL
Data is not replicated.


REPL_SYNC

public static final CacheMode REPL_SYNC
Data replicated synchronously.


REPL_ASYNC

public static final CacheMode REPL_ASYNC
Data replicated asynchronously.


INVALIDATION_SYNC

public static final CacheMode INVALIDATION_SYNC
Data invalidated synchronously.


INVALIDATION_ASYNC

public static final CacheMode INVALIDATION_ASYNC
Data invalidated asynchronously.


DIST_SYNC

public static final CacheMode DIST_SYNC
Synchronous DIST


DIST_ASYNC

public static final CacheMode DIST_ASYNC
Async DIST

Method Detail

values

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

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

valueOf

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

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()

toSync

public CacheMode toSync()

toAsync

public CacheMode toAsync()

friendlyCacheModeString

public String friendlyCacheModeString()

-->

Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.