org.jboss.cache
Enum CacheStatus

java.lang.Object
  extended by java.lang.Enum<CacheStatus>
      extended by org.jboss.cache.CacheStatus
All Implemented Interfaces:
Serializable, Comparable<CacheStatus>

public enum CacheStatus
extends Enum<CacheStatus>

Various states that an object that has a four stage lifecycle (i.e. create(), start(), stop() and destroy()) might be in.

Version:
$Revision: 6966 $
Author:
Brian Stansberry

Enum Constant Summary
CREATED
          The create() method has been completed but start() has not been called.
CREATING
          The create() method has been called but not yet completed.
DESTROYED
          The destroy() method has completed.
DESTROYING
          The destroy() method has been called but has not yet completed.
FAILED
          A failure occurred during the execution of create(), start(), stop() or destroy().
INSTANTIATED
          Object has been instantiated, but create() has not been called.
STARTED
          The start() method has completed.
STARTING
          The start() method has been called but has not yet completed.
STOPPED
          The stop() method has completed but destroy() has not yet been called.
STOPPING
          The stop() method has been called but has not yet completed.
 
Method Summary
 boolean allowInvocations()
           
 boolean createAllowed()
           
 boolean destroyAllowed()
           
 boolean needCreateBeforeStart()
           
 boolean needStopBeforeDestroy()
           
 boolean needToDestroyFailedCache()
           
 boolean startAllowed()
           
 boolean stopAllowed()
           
static CacheStatus valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CacheStatus[] 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

INSTANTIATED

public static final CacheStatus INSTANTIATED
Object has been instantiated, but create() has not been called.


CREATING

public static final CacheStatus CREATING
The create() method has been called but not yet completed.


CREATED

public static final CacheStatus CREATED
The create() method has been completed but start() has not been called.


STARTING

public static final CacheStatus STARTING
The start() method has been called but has not yet completed.


STARTED

public static final CacheStatus STARTED
The start() method has completed.


STOPPING

public static final CacheStatus STOPPING
The stop() method has been called but has not yet completed.


STOPPED

public static final CacheStatus STOPPED
The stop() method has completed but destroy() has not yet been called. Conceptually equivalent to CREATED.


DESTROYING

public static final CacheStatus DESTROYING
The destroy() method has been called but has not yet completed.


DESTROYED

public static final CacheStatus DESTROYED
The destroy() method has completed. Conceptually equivalent to INSTANTIATED.


FAILED

public static final CacheStatus FAILED
A failure occurred during the execution of create(), start(), stop() or destroy(). The next logical transition is to call destroy().

Method Detail

values

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

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

valueOf

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

createAllowed

public boolean createAllowed()

needToDestroyFailedCache

public boolean needToDestroyFailedCache()

startAllowed

public boolean startAllowed()

needCreateBeforeStart

public boolean needCreateBeforeStart()

stopAllowed

public boolean stopAllowed()

destroyAllowed

public boolean destroyAllowed()

needStopBeforeDestroy

public boolean needStopBeforeDestroy()

allowInvocations

public boolean allowInvocations()


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