org.jtoolkit.essence.concurrency
Enum Concurrency

java.lang.Object
  extended by java.lang.Enum<Concurrency>
      extended by org.jtoolkit.essence.concurrency.Concurrency
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Concurrency>

public enum Concurrency
extends java.lang.Enum<Concurrency>

Represents the level of concurrency a thread safe component can achieve.

Author:
Peter Lawrey

Enum Constant Summary
CONCURRENT_READ
           
CONCURRENT_READ_WRITE
           
IMMUTABLE
           
SYNCHRONIZED
           
THREAD_LOCAL
           
 
Field Summary
 int concurrentReads
           
 int concurrentWrtes
           
 
Method Summary
static Concurrency valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Concurrency[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

IMMUTABLE

public static final Concurrency IMMUTABLE

SYNCHRONIZED

public static final Concurrency SYNCHRONIZED

THREAD_LOCAL

public static final Concurrency THREAD_LOCAL

CONCURRENT_READ

public static final Concurrency CONCURRENT_READ

CONCURRENT_READ_WRITE

public static final Concurrency CONCURRENT_READ_WRITE
Field Detail

concurrentReads

public final int concurrentReads

concurrentWrtes

public final int concurrentWrtes
Method Detail

values

public static final Concurrency[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(Concurrency c : Concurrency.values())
        System.out.println(c);

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

valueOf

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


Copyright © Peter Lawrey. All Rights Reserved.