org.rhq.core.pc.util
Enum FacetLockType

java.lang.Object
  extended by java.lang.Enum<FacetLockType>
      extended by org.rhq.core.pc.util.FacetLockType
All Implemented Interfaces:
Serializable, Comparable<FacetLockType>

public enum FacetLockType
extends Enum<FacetLockType>

Defines the lock that should be obtained before a facet interface method is invoked.

Author:
John Mazzitelli

Enum Constant Summary
NONE
          Indicates that a facet method invocation does not need to be synchronized at all and can be performed concurrently.
READ
          Indicates that a facet method is being called with the intention of only needing to read data from a managed resource and thus only needs to acquire a read-lock before it can be invoked.
WRITE
          Indicates that a facet method is being called with the intention of possibly changing a managed resource and thus needs to acquire a full write-lock before it can be invoked.
 
Method Summary
static FacetLockType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FacetLockType[] 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

NONE

public static final FacetLockType NONE
Indicates that a facet method invocation does not need to be synchronized at all and can be performed concurrently.


READ

public static final FacetLockType READ
Indicates that a facet method is being called with the intention of only needing to read data from a managed resource and thus only needs to acquire a read-lock before it can be invoked.


WRITE

public static final FacetLockType WRITE
Indicates that a facet method is being called with the intention of possibly changing a managed resource and thus needs to acquire a full write-lock before it can be invoked.

Method Detail

values

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

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

valueOf

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


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.