commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1406724 - in /commons/proper/jcs/trunk: auxiliary-builds/javagroups/src/java/org/apache/jcs/auxiliary/javagroups/ auxiliary-builds/jdk14/src/java/org/apache/jcs/auxiliary/javagroups/ src/experimental/org/apache/jcs/auxiliary/lateral/http/s...
Date Wed, 07 Nov 2012 17:19:04 GMT
Author: tv
Date: Wed Nov  7 17:19:03 2012
New Revision: 1406724

URL: http://svn.apache.org/viewvc?rev=1406724&view=rev
Log:
Use typesafe enums instead of numeric constants

Added:
    commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/CacheStatus.java   (with props)
    commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/ElementEventType.java   (contents, props changed)
      - copied, changed from r1344803, commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/IElementEventConstants.java
Removed:
    commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/IElementEventConstants.java
Modified:
    commons/proper/jcs/trunk/auxiliary-builds/javagroups/src/java/org/apache/jcs/auxiliary/javagroups/JavaGroupsCache.java
    commons/proper/jcs/trunk/auxiliary-builds/jdk14/src/java/org/apache/jcs/auxiliary/javagroups/JavaGroupsCache.java
    commons/proper/jcs/trunk/src/experimental/org/apache/jcs/auxiliary/lateral/http/server/AbstractDeleteCacheServlet.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/admin/CacheRegionInfo.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/AbstractDiskCache.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCache.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheMonitor.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheNoWait.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheNoWaitFacade.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/AbstractRemoteAuxiliaryCache.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/AbstractRemoteCacheNoWaitFacade.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheMonitor.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWait.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWaitFacade.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/behavior/IRemoteCacheConstants.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/http/behavior/IRemoteHttpCacheConstants.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheMonitor.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/CacheConstants.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/CompositeCacheAttributes.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/behavior/ICache.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/behavior/ICompositeCacheAttributes.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/CompositeCache.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/ElementEvent.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/IElementEvent.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/IElementEventHandler.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/memory/AbstractMemoryCache.java
    commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/memory/shrinking/ShrinkerThread.java
    commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/MockAuxiliaryCache.java
    commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/AbstractDiskCacheUnitTest.java
    commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/file/FileDiskCacheUnitTest.java
    commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/MockLateralCache.java
    commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/MockRemoteCacheClient.java
    commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheNoWaitUnitTest.java
    commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/CompositeCacheDiskUsageUnitTest.java
    commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/event/ElementEventHandlerMockImpl.java
    commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/event/SimpleEventHandlingUnitTest.java

Modified: commons/proper/jcs/trunk/auxiliary-builds/javagroups/src/java/org/apache/jcs/auxiliary/javagroups/JavaGroupsCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/auxiliary-builds/javagroups/src/java/org/apache/jcs/auxiliary/javagroups/JavaGroupsCache.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/auxiliary-builds/javagroups/src/java/org/apache/jcs/auxiliary/javagroups/JavaGroupsCache.java (original)
+++ commons/proper/jcs/trunk/auxiliary-builds/javagroups/src/java/org/apache/jcs/auxiliary/javagroups/JavaGroupsCache.java Wed Nov  7 17:19:03 2012
@@ -104,7 +104,7 @@ public class JavaGroupsCache
 
         // If all the above succeed, the cache is now alive.
 
-        this.status = CacheConstants.STATUS_ALIVE;
+        this.status = CacheStatus.ALIVE;
 
         log.info( "Initialized for cache: " + cacheName );
     }
@@ -228,7 +228,7 @@ public class JavaGroupsCache
         channel.disconnect();
         channel.close();
 
-        status = CacheConstants.STATUS_DISPOSED;
+        status = CacheStatus.DISPOSED;
 
         log.info( "Disposed for cache: " + cacheName );
     }

Modified: commons/proper/jcs/trunk/auxiliary-builds/jdk14/src/java/org/apache/jcs/auxiliary/javagroups/JavaGroupsCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/auxiliary-builds/jdk14/src/java/org/apache/jcs/auxiliary/javagroups/JavaGroupsCache.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/auxiliary-builds/jdk14/src/java/org/apache/jcs/auxiliary/javagroups/JavaGroupsCache.java (original)
+++ commons/proper/jcs/trunk/auxiliary-builds/jdk14/src/java/org/apache/jcs/auxiliary/javagroups/JavaGroupsCache.java Wed Nov  7 17:19:03 2012
@@ -110,7 +110,7 @@ public class JavaGroupsCache
 
         // If all the above succeed, the cache is now alive.
 
-        this.status = CacheConstants.STATUS_ALIVE;
+        this.status = CacheStatus.ALIVE;
 
         log.info( "Initialized for cache: " + cacheName );
     }
@@ -239,7 +239,7 @@ public class JavaGroupsCache
         channel.disconnect();
         channel.close();
 
-        status = CacheConstants.STATUS_DISPOSED;
+        status = CacheStatus.DISPOSED;
 
         log.info( "Disposed for cache: " + cacheName );
     }

Modified: commons/proper/jcs/trunk/src/experimental/org/apache/jcs/auxiliary/lateral/http/server/AbstractDeleteCacheServlet.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/experimental/org/apache/jcs/auxiliary/lateral/http/server/AbstractDeleteCacheServlet.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/experimental/org/apache/jcs/auxiliary/lateral/http/server/AbstractDeleteCacheServlet.java (original)
+++ commons/proper/jcs/trunk/src/experimental/org/apache/jcs/auxiliary/lateral/http/server/AbstractDeleteCacheServlet.java Wed Nov  7 17:19:03 2012
@@ -228,9 +228,9 @@ public abstract class AbstractDeleteCach
                 out.print( cache.getSize() );
                 out.print( "</td><td>" );
                 int status = cache.getStatus();
-                out.print( status == CacheConstants.STATUS_ALIVE ? "ALIVE"
-                     : status == CacheConstants.STATUS_DISPOSED ? "DISPOSED"
-                     : status == CacheConstants.STATUS_ERROR ? "ERROR"
+                out.print( status == CacheStatus.ALIVE ? "ALIVE"
+                     : status == CacheStatus.DISPOSED ? "DISPOSED"
+                     : status == CacheStatus.ERROR ? "ERROR"
                      : "UNKNOWN" );
                 out.print( "</td>" );
                 out.println( "<td><a href=?task=stats&hashtableName=" + name + "&key=NONE&antiCacheRandom="

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/admin/CacheRegionInfo.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/admin/CacheRegionInfo.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/admin/CacheRegionInfo.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/admin/CacheRegionInfo.java Wed Nov  7 17:19:03 2012
@@ -19,7 +19,6 @@ package org.apache.jcs.admin;
  * under the License.
  */
 
-import org.apache.jcs.engine.CacheConstants;
 import org.apache.jcs.engine.control.CompositeCache;
 
 /**
@@ -54,15 +53,7 @@ public class CacheRegionInfo
      */
     public String getStatus()
     {
-        int status = this.cache.getStatus();
-
-        return ( status == CacheConstants.STATUS_ALIVE
-                                                      ? "ALIVE"
-                                                      : status == CacheConstants.STATUS_DISPOSED
-                                                                                                ? "DISPOSED"
-                                                                                                : status == CacheConstants.STATUS_ERROR
-                                                                                                                                       ? "ERROR"
-                                                                                                                                       : "UNKNOWN" );
+        return this.cache.getStatus().toString();
     }
 
     /**

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/AbstractDiskCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/AbstractDiskCache.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/AbstractDiskCache.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/AbstractDiskCache.java Wed Nov  7 17:19:03 2012
@@ -35,9 +35,9 @@ import org.apache.commons.logging.LogFac
 import org.apache.jcs.auxiliary.AbstractAuxiliaryCacheEventLogging;
 import org.apache.jcs.auxiliary.AuxiliaryCache;
 import org.apache.jcs.auxiliary.disk.behavior.IDiskCacheAttributes;
-import org.apache.jcs.engine.CacheConstants;
 import org.apache.jcs.engine.CacheEventQueueFactory;
 import org.apache.jcs.engine.CacheInfo;
+import org.apache.jcs.engine.CacheStatus;
 import org.apache.jcs.engine.behavior.ICache;
 import org.apache.jcs.engine.behavior.ICacheElement;
 import org.apache.jcs.engine.behavior.ICacheEventQueue;
@@ -564,9 +564,9 @@ public abstract class AbstractDiskCache<
      * @return the status -- alive or disposed from CacheConstants
      * @see ICache#getStatus
      */
-    public int getStatus()
+    public CacheStatus getStatus()
     {
-        return ( alive ? CacheConstants.STATUS_ALIVE : CacheConstants.STATUS_DISPOSED );
+        return ( alive ? CacheStatus.ALIVE : CacheStatus.DISPOSED );
     }
 
     /**

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCache.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCache.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCache.java Wed Nov  7 17:19:03 2012
@@ -31,7 +31,7 @@ import org.apache.commons.logging.LogFac
 import org.apache.jcs.auxiliary.AbstractAuxiliaryCacheEventLogging;
 import org.apache.jcs.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes;
-import org.apache.jcs.engine.CacheConstants;
+import org.apache.jcs.engine.CacheStatus;
 import org.apache.jcs.engine.ZombieCacheServiceNonLocal;
 import org.apache.jcs.engine.behavior.ICacheElement;
 import org.apache.jcs.engine.behavior.ICacheServiceNonLocal;
@@ -305,9 +305,9 @@ public class LateralCache<K extends Seri
      * <p>
      * @return The status value
      */
-    public int getStatus()
+    public CacheStatus getStatus()
     {
-        return this.lateralCacheService instanceof IZombie ? CacheConstants.STATUS_ERROR : CacheConstants.STATUS_ALIVE;
+        return this.lateralCacheService instanceof IZombie ? CacheStatus.ERROR : CacheStatus.ALIVE;
     }
 
     /**

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheMonitor.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheMonitor.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheMonitor.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheMonitor.java Wed Nov  7 17:19:03 2012
@@ -22,7 +22,7 @@ package org.apache.jcs.auxiliary.lateral
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheManager;
-import org.apache.jcs.engine.CacheConstants;
+import org.apache.jcs.engine.CacheStatus;
 
 /**
  * Used to monitor and repair any failed connection for the lateral cache service. By default the
@@ -221,7 +221,7 @@ public class LateralCacheMonitor
 
                     for (LateralCacheNoWait<?, ?> c : mgr.getCaches().values())
                     {
-                        if ( c.getStatus() == CacheConstants.STATUS_ERROR )
+                        if ( c.getStatus() == CacheStatus.ERROR )
                         {
                             log.info( "found LateralCacheNoWait in error, " + c.toString() );
 

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheNoWait.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheNoWait.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheNoWait.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheNoWait.java Wed Nov  7 17:19:03 2012
@@ -35,8 +35,8 @@ import org.apache.commons.logging.LogFac
 import org.apache.jcs.auxiliary.AbstractAuxiliaryCache;
 import org.apache.jcs.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.jcs.engine.CacheAdaptor;
-import org.apache.jcs.engine.CacheConstants;
 import org.apache.jcs.engine.CacheEventQueueFactory;
+import org.apache.jcs.engine.CacheStatus;
 import org.apache.jcs.engine.behavior.ICacheElement;
 import org.apache.jcs.engine.behavior.ICacheEventQueue;
 import org.apache.jcs.engine.behavior.ICacheServiceNonLocal;
@@ -99,7 +99,7 @@ public class LateralCacheNoWait<K extend
         // perform updates using a different method that specifies the listener
         // this.q = new CacheEventQueue(new CacheAdaptor(this),
         // LateralCacheInfo.listenerId, cache.getCacheName());
-        if ( cache.getStatus() == CacheConstants.STATUS_ERROR )
+        if ( cache.getStatus() == CacheStatus.ERROR )
         {
             eventQueue.destroy();
         }
@@ -133,7 +133,7 @@ public class LateralCacheNoWait<K extend
     public ICacheElement<K, V> get( K key )
     {
         getCount++;
-        if ( this.getStatus() != CacheConstants.STATUS_ERROR )
+        if ( this.getStatus() != CacheStatus.ERROR )
         {
             try
             {
@@ -196,7 +196,7 @@ public class LateralCacheNoWait<K extend
     public Map<K, ICacheElement<K, V>> getMatching(String pattern)
     {
         getCount++;
-        if ( this.getStatus() != CacheConstants.STATUS_ERROR )
+        if ( this.getStatus() != CacheStatus.ERROR )
         {
             try
             {
@@ -316,9 +316,9 @@ public class LateralCacheNoWait<K extend
      * <p>
      * @return The status value
      */
-    public int getStatus()
+    public CacheStatus getStatus()
     {
-        return eventQueue.isWorking() ? cache.getStatus() : CacheConstants.STATUS_ERROR;
+        return eventQueue.isWorking() ? cache.getStatus() : CacheStatus.ERROR;
     }
 
     /**

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheNoWaitFacade.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheNoWaitFacade.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheNoWaitFacade.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheNoWaitFacade.java Wed Nov  7 17:19:03 2012
@@ -35,6 +35,7 @@ import org.apache.jcs.auxiliary.Abstract
 import org.apache.jcs.auxiliary.AuxiliaryCache;
 import org.apache.jcs.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes;
+import org.apache.jcs.engine.CacheStatus;
 import org.apache.jcs.engine.behavior.ICacheElement;
 import org.apache.jcs.engine.stats.StatElement;
 import org.apache.jcs.engine.stats.Stats;
@@ -400,9 +401,9 @@ public class LateralCacheNoWaitFacade<K 
      * Gets the status attribute of the LateralCacheNoWaitFacade object
      * @return The status value
      */
-    public int getStatus()
+    public CacheStatus getStatus()
     {
-        return 0;
+        return CacheStatus.ALIVE;
         //q.isAlive() ? cache.getStatus() : cache.STATUS_ERROR;
     }
 

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/AbstractRemoteAuxiliaryCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/AbstractRemoteAuxiliaryCache.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/AbstractRemoteAuxiliaryCache.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/AbstractRemoteAuxiliaryCache.java Wed Nov  7 17:19:03 2012
@@ -39,7 +39,7 @@ import org.apache.jcs.auxiliary.Auxiliar
 import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheAttributes;
 import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheClient;
 import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheListener;
-import org.apache.jcs.engine.CacheConstants;
+import org.apache.jcs.engine.CacheStatus;
 import org.apache.jcs.engine.ZombieCacheServiceNonLocal;
 import org.apache.jcs.engine.behavior.ICacheElement;
 import org.apache.jcs.engine.behavior.ICacheElementSerialized;
@@ -613,9 +613,9 @@ public abstract class AbstractRemoteAuxi
      * <p>
      * @return The status value
      */
-    public int getStatus()
+    public CacheStatus getStatus()
     {
-        return getRemoteCacheService() instanceof IZombie ? CacheConstants.STATUS_ERROR : CacheConstants.STATUS_ALIVE;
+        return getRemoteCacheService() instanceof IZombie ? CacheStatus.ERROR : CacheStatus.ALIVE;
     }
 
     /**

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/AbstractRemoteCacheNoWaitFacade.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/AbstractRemoteCacheNoWaitFacade.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/AbstractRemoteCacheNoWaitFacade.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/AbstractRemoteCacheNoWaitFacade.java Wed Nov  7 17:19:03 2012
@@ -35,7 +35,7 @@ import org.apache.jcs.auxiliary.Abstract
 import org.apache.jcs.auxiliary.AuxiliaryCache;
 import org.apache.jcs.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheAttributes;
-import org.apache.jcs.engine.CacheConstants;
+import org.apache.jcs.engine.CacheStatus;
 import org.apache.jcs.engine.behavior.ICacheElement;
 import org.apache.jcs.engine.behavior.ICompositeCacheManager;
 import org.apache.jcs.engine.behavior.IElementSerializer;
@@ -337,16 +337,17 @@ public abstract class AbstractRemoteCach
      * <p>
      * @return The status value
      */
-    public int getStatus()
+    public CacheStatus getStatus()
     {
         for ( int i = 0; i < noWaits.length; i++ )
         {
-            if ( noWaits[i].getStatus() == CacheConstants.STATUS_ALIVE )
+            if ( noWaits[i].getStatus() == CacheStatus.ALIVE )
             {
-                return CacheConstants.STATUS_ALIVE;
+                return CacheStatus.ALIVE;
             }
         }
-        return 0;
+
+        return CacheStatus.DISPOSED;
     }
 
     /**

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java Wed Nov  7 17:19:03 2012
@@ -24,7 +24,7 @@ import java.io.Serializable;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.jcs.engine.CacheConstants;
+import org.apache.jcs.engine.CacheStatus;
 import org.apache.jcs.engine.behavior.ICache;
 import org.apache.jcs.engine.behavior.ICompositeCacheManager;
 import org.apache.jcs.engine.behavior.IElementSerializer;
@@ -216,7 +216,7 @@ public class RemoteCacheFailoverRunner<K
                         ICache<K, V> ic = rcm.getCache( rca.getCacheName() );
                         if ( ic != null )
                         {
-                            if ( ic.getStatus() == CacheConstants.STATUS_ALIVE )
+                            if ( ic.getStatus() == CacheStatus.ALIVE )
                             {
                                 // may need to do this more gracefully
                                 log.debug( "resetting no wait" );
@@ -370,7 +370,7 @@ public class RemoteCacheFailoverRunner<K
 
             if ( ic != null )
             {
-                if ( ic.getStatus() == CacheConstants.STATUS_ALIVE )
+                if ( ic.getStatus() == CacheStatus.ALIVE )
                 {
                     try
                     {
@@ -378,7 +378,7 @@ public class RemoteCacheFailoverRunner<K
                         // now.
                         // this will not result in a loop, only duplication
                         // stop duplicate listening.
-                        if ( facade.noWaits[0] != null && facade.noWaits[0].getStatus() == CacheConstants.STATUS_ALIVE )
+                        if ( facade.noWaits[0] != null && facade.noWaits[0].getStatus() == CacheStatus.ALIVE )
                         {
                             int fidx = facade.remoteCacheAttributes.getFailoverIndex();
 

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheMonitor.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheMonitor.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheMonitor.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheMonitor.java Wed Nov  7 17:19:03 2012
@@ -21,7 +21,7 @@ package org.apache.jcs.auxiliary.remote;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.jcs.engine.CacheConstants;
+import org.apache.jcs.engine.CacheStatus;
 
 /**
  * Used to monitor and repair any failed connection for the remote cache service. By default the
@@ -185,7 +185,7 @@ public class RemoteCacheMonitor
                     // them once and for all.
                     for (RemoteCacheNoWait<?, ?> c : mgr.caches.values())
                     {
-                        if ( c.getStatus() == CacheConstants.STATUS_ERROR )
+                        if ( c.getStatus() == CacheStatus.ERROR )
                         {
                             RemoteCacheRestore repairer = new RemoteCacheRestore( mgr );
                             // If we can't fix them, just skip and re-try in

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWait.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWait.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWait.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWait.java Wed Nov  7 17:19:03 2012
@@ -36,8 +36,8 @@ import org.apache.jcs.auxiliary.Abstract
 import org.apache.jcs.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheClient;
 import org.apache.jcs.engine.CacheAdaptor;
-import org.apache.jcs.engine.CacheConstants;
 import org.apache.jcs.engine.CacheEventQueueFactory;
+import org.apache.jcs.engine.CacheStatus;
 import org.apache.jcs.engine.behavior.ICacheElement;
 import org.apache.jcs.engine.behavior.ICacheEventQueue;
 import org.apache.jcs.engine.behavior.ICacheServiceNonLocal;
@@ -111,7 +111,7 @@ public class RemoteCacheNoWait<K extends
             .getListenerId(), remoteCacheClient.getCacheName(), remoteCacheClient.getAuxiliaryCacheAttributes()
             .getEventQueuePoolName(), remoteCacheClient.getAuxiliaryCacheAttributes().getEventQueueType() );
 
-        if ( remoteCacheClient.getStatus() == CacheConstants.STATUS_ERROR )
+        if ( remoteCacheClient.getStatus() == CacheStatus.ERROR )
         {
             cacheEventQueue.destroy();
         }
@@ -370,9 +370,9 @@ public class RemoteCacheNoWait<K extends
      * <p>
      * @return The status value
      */
-    public int getStatus()
+    public CacheStatus getStatus()
     {
-        return cacheEventQueue.isWorking() ? remoteCacheClient.getStatus() : CacheConstants.STATUS_ERROR;
+        return cacheEventQueue.isWorking() ? remoteCacheClient.getStatus() : CacheStatus.ERROR;
     }
 
     /**
@@ -488,23 +488,7 @@ public class RemoteCacheNoWait<K extends
 
         se = new StatElement();
         se.setName( "Status" );
-        int status = this.getStatus();
-        if ( status == CacheConstants.STATUS_ERROR )
-        {
-            se.setData( "ERROR" );
-        }
-        else if ( status == CacheConstants.STATUS_ALIVE )
-        {
-            se.setData( "ALIVE" );
-        }
-        else if ( status == CacheConstants.STATUS_DISPOSED )
-        {
-            se.setData( "DISPOSED" );
-        }
-        else
-        {
-            se.setData( "" + status );
-        }
+        se.setData( getStatus().toString() );
         elems.add( se );
 
         // no data gathered here

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWaitFacade.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWaitFacade.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWaitFacade.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWaitFacade.java Wed Nov  7 17:19:03 2012
@@ -23,7 +23,7 @@ import java.io.Serializable;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.jcs.engine.CacheConstants;
+import org.apache.jcs.engine.CacheStatus;
 import org.apache.jcs.engine.behavior.ICompositeCacheManager;
 import org.apache.jcs.engine.behavior.IElementSerializer;
 import org.apache.jcs.engine.logging.behavior.ICacheEventLogger;
@@ -76,7 +76,7 @@ public class RemoteCacheNoWaitFacade<K e
 
         if ( remoteCacheAttributes.getRemoteType() == RemoteCacheAttributes.LOCAL )
         {
-            if ( noWaits[i].getStatus() == CacheConstants.STATUS_ERROR )
+            if ( noWaits[i].getStatus() == CacheStatus.ERROR )
             {
                 // start failover, primary recovery process
                 RemoteCacheFailoverRunner<K, V> runner =

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/behavior/IRemoteCacheConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/behavior/IRemoteCacheConstants.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/behavior/IRemoteCacheConstants.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/behavior/IRemoteCacheConstants.java Wed Nov  7 17:19:03 2012
@@ -27,43 +27,43 @@ import org.apache.jcs.engine.behavior.IC
 public interface IRemoteCacheConstants
 {
     /** Mapping to props file value */
-    public final static String REMOTE_CACHE_SERVICE_VAL = ICacheServiceNonLocal.class.getName();
+    String REMOTE_CACHE_SERVICE_VAL = ICacheServiceNonLocal.class.getName();
 
     /** The prefix for cache server config. */
-    public final static String CACHE_SERVER_PREFIX = "jcs.remotecache";
+    String CACHE_SERVER_PREFIX = "jcs.remotecache";
 
     /**
      * I'm trying to migrate everything to use this prefix. All those below will be replaced. Any of
      * the RemoteCacheServerAttributes can be configured this way.
      */
-    public final static String CACHE_SERVER_ATTRIBUTES_PROPERTY_PREFIX = CACHE_SERVER_PREFIX + ".serverattributes";
+    String CACHE_SERVER_ATTRIBUTES_PROPERTY_PREFIX = CACHE_SERVER_PREFIX + ".serverattributes";
 
     /**
      * This is the name of the class that will be used for an object specific socket factory.
      */
-    public final static String CUSTOM_RMI_SOCKET_FACTORY_PROPERTY_PREFIX = CACHE_SERVER_PREFIX + ".customrmisocketfactory";
+    String CUSTOM_RMI_SOCKET_FACTORY_PROPERTY_PREFIX = CACHE_SERVER_PREFIX + ".customrmisocketfactory";
 
     /** Property prefix, should be jcs.remote but this would break existing config. */
-    public final static String PROPERTY_PREFIX = "remote";    
+    String PROPERTY_PREFIX = "remote";
 
     /** Mapping to props file value */
-    public final static String SOCKET_TIMEOUT_MILLIS = PROPERTY_PREFIX + ".cache.rmiSocketFactoryTimeoutMillis";
+    String SOCKET_TIMEOUT_MILLIS = PROPERTY_PREFIX + ".cache.rmiSocketFactoryTimeoutMillis";
 
     /** Mapping to props file value */
-    public final static String REMOTE_CACHE_SERVICE_NAME = PROPERTY_PREFIX + ".cache.service.name";
+    String REMOTE_CACHE_SERVICE_NAME = PROPERTY_PREFIX + ".cache.service.name";
 
     /** Mapping to props file value */
-    public final static String TOMCAT_XML = PROPERTY_PREFIX + ".tomcat.xml";
+    String TOMCAT_XML = PROPERTY_PREFIX + ".tomcat.xml";
 
     /** Mapping to props file value */
-    public final static String TOMCAT_ON = PROPERTY_PREFIX + ".tomcat.on";
+    String TOMCAT_ON = PROPERTY_PREFIX + ".tomcat.on";
 
     /** Mapping to props file value */
-    public final static String REMOTE_CACHE_SERVICE_PORT = PROPERTY_PREFIX + ".cache.service.port";
+    String REMOTE_CACHE_SERVICE_PORT = PROPERTY_PREFIX + ".cache.service.port";
 
     /** Mapping to props file value */
-    public final static String REMOTE_LOCAL_CLUSTER_CONSISTENCY = PROPERTY_PREFIX + ".cluster.LocalClusterConsistency";
+    String REMOTE_LOCAL_CLUSTER_CONSISTENCY = PROPERTY_PREFIX + ".cluster.LocalClusterConsistency";
 
     /** Mapping to props file value */
-    public final static String REMOTE_ALLOW_CLUSTER_GET = PROPERTY_PREFIX + ".cluster.AllowClusterGet";
+    String REMOTE_ALLOW_CLUSTER_GET = PROPERTY_PREFIX + ".cluster.AllowClusterGet";
 }

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/http/behavior/IRemoteHttpCacheConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/http/behavior/IRemoteHttpCacheConstants.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/http/behavior/IRemoteHttpCacheConstants.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/http/behavior/IRemoteHttpCacheConstants.java Wed Nov  7 17:19:03 2012
@@ -23,9 +23,9 @@ package org.apache.jcs.auxiliary.remote.
 public interface IRemoteHttpCacheConstants
 {
     /** The prefix for cache server config. */
-    public final static String HTTP_CACHE_SERVER_PREFIX = "jcs.remotehttpcache";
+    String HTTP_CACHE_SERVER_PREFIX = "jcs.remotehttpcache";
 
     /** All of the RemoteHttpCacheServiceAttributes can be configured this way. */
-    public final static String HTTP_CACHE_SERVER_ATTRIBUTES_PROPERTY_PREFIX = HTTP_CACHE_SERVER_PREFIX
+    String HTTP_CACHE_SERVER_ATTRIBUTES_PROPERTY_PREFIX = HTTP_CACHE_SERVER_PREFIX
         + ".serverattributes";
 }

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheMonitor.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheMonitor.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheMonitor.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheMonitor.java Wed Nov  7 17:19:03 2012
@@ -26,7 +26,7 @@ import java.util.Set;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.jcs.auxiliary.remote.http.client.behavior.IRemoteHttpCacheClient;
-import org.apache.jcs.engine.CacheConstants;
+import org.apache.jcs.engine.CacheStatus;
 
 /**
  * Upon the notification of a connection error, the monitor changes to operate in a time driven
@@ -202,7 +202,7 @@ public class RemoteHttpCacheMonitor
             {
                 try
                 {
-                    if ( remoteCache.getStatus() == CacheConstants.STATUS_ERROR )
+                    if ( remoteCache.getStatus() == CacheStatus.ERROR )
                     {
                         RemoteHttpCacheAttributes attributes = remoteCache.getRemoteHttpCacheAttributes();
 

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/CacheConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/CacheConstants.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/CacheConstants.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/CacheConstants.java Wed Nov  7 17:19:03 2012
@@ -27,17 +27,8 @@ package org.apache.jcs.engine;
 public interface CacheConstants
 {
     /** This is the name of the config file that we will look for by default. */
-    public static final String DEFAULT_CONFIG = "/cache.ccf";
-
-    /** Cache alive status. */
-    public final static int STATUS_ALIVE = 1;
-
-    /** Cache disposed status. */
-    public final static int STATUS_DISPOSED = 2;
-
-    /** Cache in error. */
-    public final static int STATUS_ERROR = 3;
+    String DEFAULT_CONFIG = "/cache.ccf";
 
     /** Delimiter of a cache name component. This is used for hierarchical deletion */
-    public final static String NAME_COMPONENT_DELIMITER = ":";
+    String NAME_COMPONENT_DELIMITER = ":";
 }

Added: commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/CacheStatus.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/CacheStatus.java?rev=1406724&view=auto
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/CacheStatus.java (added)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/CacheStatus.java Wed Nov  7 17:19:03 2012
@@ -0,0 +1,37 @@
+package org.apache.jcs.engine;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Cache statuses
+ * <p>
+ * @version $Id: CacheStatus.java 536904 2007-05-10 16:03:42Z tv $
+ */
+public enum CacheStatus
+{
+    /** Cache alive status. */
+    ALIVE,
+
+    /** Cache disposed status. */
+    DISPOSED,
+
+    /** Cache in error. */
+    ERROR
+}

Propchange: commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/CacheStatus.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/CompositeCacheAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/CompositeCacheAttributes.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/CompositeCacheAttributes.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/CompositeCacheAttributes.java Wed Nov  7 17:19:03 2012
@@ -95,7 +95,7 @@ public class CompositeCacheAttributes
     private String memoryCacheName;
 
     /** Set via DISK_USAGE_PATTERN_NAME */
-    private short diskUsagePattern = DISK_USAGE_PATTERN_SWAP;
+    private DiskUsagePattern diskUsagePattern = DiskUsagePattern.SWAP;
 
     /** How many to spool to disk at a time. */
     private int spoolChunkSize = DEFAULT_CHUNK_SIZE;
@@ -321,7 +321,7 @@ public class CompositeCacheAttributes
      * <p>
      * @param diskUsagePattern The diskUsagePattern to set.
      */
-    public void setDiskUsagePattern( short diskUsagePattern )
+    public void setDiskUsagePattern( DiskUsagePattern diskUsagePattern )
     {
         this.diskUsagePattern = diskUsagePattern;
     }
@@ -337,14 +337,14 @@ public class CompositeCacheAttributes
     {
         if ( diskUsagePatternName != null )
         {
-            diskUsagePatternName = diskUsagePatternName.toUpperCase().trim();
-            if ( diskUsagePatternName.startsWith( "SWAP" ) )
+            String name = diskUsagePatternName.toUpperCase().trim();
+            if ( name.startsWith( "SWAP" ) )
             {
-                this.setDiskUsagePattern( DISK_USAGE_PATTERN_SWAP );
+                this.setDiskUsagePattern( DiskUsagePattern.SWAP );
             }
-            else if ( diskUsagePatternName.startsWith( "UPDATE" ) )
+            else if ( name.startsWith( "UPDATE" ) )
             {
-                this.setDiskUsagePattern( DISK_USAGE_PATTERN_UPDATE );
+                this.setDiskUsagePattern( DiskUsagePattern.UPDATE );
             }
         }
     }
@@ -372,7 +372,7 @@ public class CompositeCacheAttributes
     /**
      * @return Returns the diskUsagePattern.
      */
-    public short getDiskUsagePattern()
+    public DiskUsagePattern getDiskUsagePattern()
     {
         return diskUsagePattern;
     }

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/behavior/ICache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/behavior/ICache.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/behavior/ICache.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/behavior/ICache.java Wed Nov  7 17:19:03 2012
@@ -24,6 +24,7 @@ import java.io.Serializable;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.jcs.engine.CacheStatus;
 import org.apache.jcs.engine.match.behavior.IKeyMatcher;
 
 /**
@@ -116,7 +117,7 @@ public interface ICache<K extends Serial
      * <p>
      * @return Alive or Error
      */
-    int getStatus();
+    CacheStatus getStatus();
 
     /**
      * Returns the cache stats.

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/behavior/ICompositeCacheAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/behavior/ICompositeCacheAttributes.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/behavior/ICompositeCacheAttributes.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/behavior/ICompositeCacheAttributes.java Wed Nov  7 17:19:03 2012
@@ -22,19 +22,22 @@ package org.apache.jcs.engine.behavior;
 import java.io.Serializable;
 
 /**
- * This defines the minimla behavior for the Cache Configuration settings.
+ * This defines the minimal behavior for the Cache Configuration settings.
  */
 public interface ICompositeCacheAttributes
     extends Serializable
 {
-    /** Items will only go to disk when the memory limit is reached. This is the default. */
-    public static final short DISK_USAGE_PATTERN_SWAP = 0;
-
-    /**
-     * Items will go to disk on a normal put. If The disk usage pattern is UPDATE, the swap will be
-     * disabled.
-     */
-    public static final short DISK_USAGE_PATTERN_UPDATE = 1;
+    enum DiskUsagePattern
+    {
+        /** Items will only go to disk when the memory limit is reached. This is the default. */
+        SWAP,
+
+        /**
+         * Items will go to disk on a normal put. If The disk usage pattern is UPDATE, the swap will be
+         * disabled.
+         */
+        UPDATE
+    }
 
     /**
      * SetMaxObjects is used to set the attribute to determine the maximum
@@ -47,14 +50,14 @@ public interface ICompositeCacheAttribut
      * @param size
      *            The new maxObjects value
      */
-    public void setMaxObjects( int size );
+    void setMaxObjects( int size );
 
     /**
      * Gets the maxObjects attribute of the ICompositeCacheAttributes object
      * <p>
      * @return The maxObjects value
      */
-    public int getMaxObjects();
+    int getMaxObjects();
 
     /**
      * Sets the useDisk attribute of the ICompositeCacheAttributes object
@@ -62,14 +65,14 @@ public interface ICompositeCacheAttribut
      * @param useDisk
      *            The new useDisk value
      */
-    public void setUseDisk( boolean useDisk );
+    void setUseDisk( boolean useDisk );
 
     /**
      * Gets the useDisk attribute of the ICompositeCacheAttributes object
      * <p>
      * @return The useDisk value
      */
-    public boolean getUseDisk();
+    boolean getUseDisk();
 
     /**
      * set whether the cache should use a lateral cache
@@ -77,14 +80,14 @@ public interface ICompositeCacheAttribut
      * @param d
      *            The new useLateral value
      */
-    public void setUseLateral( boolean d );
+    void setUseLateral( boolean d );
 
     /**
      * Gets the useLateral attribute of the ICompositeCacheAttributes object
      * <p>
      * @return The useLateral value
      */
-    public boolean getUseLateral();
+    boolean getUseLateral();
 
     /**
      * Sets whether the cache is remote enabled
@@ -92,14 +95,14 @@ public interface ICompositeCacheAttribut
      * @param isRemote
      *            The new useRemote value
      */
-    public void setUseRemote( boolean isRemote );
+    void setUseRemote( boolean isRemote );
 
     /**
      * returns whether the cache is remote enabled
      * <p>
      * @return The useRemote value
      */
-    public boolean getUseRemote();
+    boolean getUseRemote();
 
     /**
      * Sets the name of the cache, referenced by the appropriate manager.
@@ -107,14 +110,14 @@ public interface ICompositeCacheAttribut
      * @param s
      *            The new cacheName value
      */
-    public void setCacheName( String s );
+    void setCacheName( String s );
 
     /**
      * Gets the cacheName attribute of the ICompositeCacheAttributes object
      * <p>
      * @return The cacheName value
      */
-    public String getCacheName();
+    String getCacheName();
 
     /**
      * Sets the name of the MemoryCache, referenced by the appropriate manager.
@@ -123,7 +126,7 @@ public interface ICompositeCacheAttribut
      * @param s
      *            The new memoryCacheName value
      */
-    public void setMemoryCacheName( String s );
+    void setMemoryCacheName( String s );
 
     /**
      * Gets the memoryCacheName attribute of the ICompositeCacheAttributes
@@ -131,7 +134,7 @@ public interface ICompositeCacheAttribut
      * <p>
      * @return The memoryCacheName value
      */
-    public String getMemoryCacheName();
+    String getMemoryCacheName();
 
     /**
      * Whether the memory cache should perform background memory shrinkage.
@@ -139,14 +142,14 @@ public interface ICompositeCacheAttribut
      * @param useShrinker
      *            The new UseMemoryShrinker value
      */
-    public void setUseMemoryShrinker( boolean useShrinker );
+    void setUseMemoryShrinker( boolean useShrinker );
 
     /**
      * Whether the memory cache should perform background memory shrinkage.
      * <p>
      * @return The UseMemoryShrinker value
      */
-    public boolean getUseMemoryShrinker();
+    boolean getUseMemoryShrinker();
 
     /**
      * If UseMemoryShrinker is true the memory cache should auto-expire elements
@@ -155,7 +158,7 @@ public interface ICompositeCacheAttribut
      * @param seconds
      *            The new MaxMemoryIdleTimeSeconds value
      */
-    public void setMaxMemoryIdleTimeSeconds( long seconds );
+    void setMaxMemoryIdleTimeSeconds( long seconds );
 
     /**
      * If UseMemoryShrinker is true the memory cache should auto-expire elements
@@ -163,7 +166,7 @@ public interface ICompositeCacheAttribut
      * <p>
      * @return The MaxMemoryIdleTimeSeconds value
      */
-    public long getMaxMemoryIdleTimeSeconds();
+    long getMaxMemoryIdleTimeSeconds();
 
     /**
      * If UseMemoryShrinker is true the memory cache should auto-expire elements
@@ -172,7 +175,7 @@ public interface ICompositeCacheAttribut
      * @param seconds
      *            The new ShrinkerIntervalSeconds value
      */
-    public void setShrinkerIntervalSeconds( long seconds );
+    void setShrinkerIntervalSeconds( long seconds );
 
     /**
      * If UseMemoryShrinker is true the memory cache should auto-expire elements
@@ -180,7 +183,7 @@ public interface ICompositeCacheAttribut
      * <p>
      * @return The ShrinkerIntervalSeconds value
      */
-    public long getShrinkerIntervalSeconds();
+    long getShrinkerIntervalSeconds();
 
     /**
      * If UseMemoryShrinker is true the memory cache should auto-expire elements
@@ -189,7 +192,7 @@ public interface ICompositeCacheAttribut
      * @param maxSpoolPerRun
      *            The new maxSpoolPerRun value
      */
-    public void setMaxSpoolPerRun( int maxSpoolPerRun );
+    void setMaxSpoolPerRun( int maxSpoolPerRun );
 
     /**
      * If UseMemoryShrinker is true the memory cache should auto-expire elements
@@ -197,21 +200,21 @@ public interface ICompositeCacheAttribut
      * <p>
      * @return The maxSpoolPerRun value
      */
-    public int getMaxSpoolPerRun();
+    int getMaxSpoolPerRun();
 
     /**
      * Clones the attributes.
      * <p>
      * @return a new object with the same settings.
      */
-    public ICompositeCacheAttributes copy();
+    ICompositeCacheAttributes copy();
 
     /**
      * By default this is SWAP_ONLY.
      * <p>
      * @param diskUsagePattern The diskUsagePattern to set.
      */
-    public void setDiskUsagePattern( short diskUsagePattern );
+    void setDiskUsagePattern( DiskUsagePattern diskUsagePattern );
 
     /**
      * Translates the name to the disk usage pattern short value.
@@ -220,24 +223,24 @@ public interface ICompositeCacheAttribut
      * <p>
      * @param diskUsagePatternName The diskUsagePattern to set.
      */
-    public void setDiskUsagePatternName( String diskUsagePatternName );
+    void setDiskUsagePatternName( String diskUsagePatternName );
 
     /**
      * @return Returns the diskUsagePattern.
      */
-    public short getDiskUsagePattern();
-    
+    DiskUsagePattern getDiskUsagePattern();
+
     /**
      * Number to send to disk at at time when memory is full.
      * <p>
      * @return int
      */
-    public int getSpoolChunkSize();
-    
+    int getSpoolChunkSize();
+
     /**
      * Number to send to disk at a time.
      * <p>
      * @param spoolChunkSize
      */
-    public void setSpoolChunkSize( int spoolChunkSize );
+    void setSpoolChunkSize( int spoolChunkSize );
 }

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/CompositeCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/CompositeCache.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/CompositeCache.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/CompositeCache.java Wed Nov  7 17:19:03 2012
@@ -34,14 +34,16 @@ import org.apache.jcs.access.exception.C
 import org.apache.jcs.access.exception.ObjectNotFoundException;
 import org.apache.jcs.auxiliary.AuxiliaryCache;
 import org.apache.jcs.engine.CacheConstants;
+import org.apache.jcs.engine.CacheStatus;
 import org.apache.jcs.engine.behavior.ICache;
 import org.apache.jcs.engine.behavior.ICacheElement;
 import org.apache.jcs.engine.behavior.ICompositeCacheAttributes;
+import org.apache.jcs.engine.behavior.ICompositeCacheAttributes.DiskUsagePattern;
 import org.apache.jcs.engine.behavior.IElementAttributes;
 import org.apache.jcs.engine.control.event.ElementEvent;
 import org.apache.jcs.engine.control.event.ElementEventQueue;
+import org.apache.jcs.engine.control.event.behavior.ElementEventType;
 import org.apache.jcs.engine.control.event.behavior.IElementEvent;
-import org.apache.jcs.engine.control.event.behavior.IElementEventConstants;
 import org.apache.jcs.engine.control.event.behavior.IElementEventHandler;
 import org.apache.jcs.engine.control.event.behavior.IElementEventQueue;
 import org.apache.jcs.engine.control.group.GroupId;
@@ -330,7 +332,7 @@ public class CompositeCache<K extends Se
                     log.debug( "diskcache in aux list: cattr " + cacheAttr.getUseDisk() );
                 }
                 if ( cacheAttr.getUseDisk()
-                    && ( cacheAttr.getDiskUsagePattern() == ICompositeCacheAttributes.DISK_USAGE_PATTERN_UPDATE )
+                    && ( cacheAttr.getDiskUsagePattern() == DiskUsagePattern.UPDATE )
                     && cacheElement.getElementAttributes().getIsSpool() )
                 {
                     aux.update( cacheElement );
@@ -358,7 +360,7 @@ public class CompositeCache<K extends Se
         if ( !ce.getElementAttributes().getIsSpool() )
         {
             // there is an event defined for this.
-            handleElementEvent( ce, IElementEventConstants.ELEMENT_EVENT_SPOOLED_NOT_ALLOWED );
+            handleElementEvent( ce, ElementEventType.SPOOLED_NOT_ALLOWED );
             return;
         }
 
@@ -373,13 +375,12 @@ public class CompositeCache<K extends Se
             {
                 diskAvailable = true;
 
-                if ( cacheAttr.getDiskUsagePattern() == ICompositeCacheAttributes.DISK_USAGE_PATTERN_SWAP )
+                if ( cacheAttr.getDiskUsagePattern() == DiskUsagePattern.SWAP )
                 {
                     // write the last items to disk.2
                     try
                     {
-                        handleElementEvent( ce, IElementEventConstants.ELEMENT_EVENT_SPOOLED_DISK_AVAILABLE );
-
+                        handleElementEvent( ce, ElementEventType.SPOOLED_DISK_AVAILABLE );
                         aux.update( ce );
                     }
                     catch ( IOException ex )
@@ -411,7 +412,7 @@ public class CompositeCache<K extends Se
         {
             try
             {
-                handleElementEvent( ce, IElementEventConstants.ELEMENT_EVENT_SPOOLED_DISK_NOT_AVAILABLE );
+                handleElementEvent( ce, ElementEventType.SPOOLED_DISK_NOT_AVAILABLE );
             }
             catch ( Exception e )
             {
@@ -1054,7 +1055,7 @@ public class CompositeCache<K extends Se
                         log.debug( "Exceeded maxLife: " + element.getKey() );
                     }
 
-                    handleElementEvent( element, IElementEventConstants.ELEMENT_EVENT_EXCEEDED_MAXLIFE_ONREQUEST );
+                    handleElementEvent( element, ElementEventType.EXCEEDED_MAXLIFE_ONREQUEST );
 
                     return true;
                 }
@@ -1073,7 +1074,7 @@ public class CompositeCache<K extends Se
                         log.info( "Exceeded maxIdle: " + element.getKey() );
                     }
 
-                    handleElementEvent( element, IElementEventConstants.ELEMENT_EVENT_EXCEEDED_IDLETIME_ONREQUEST );
+                    handleElementEvent( element, ElementEventType.EXCEEDED_IDLETIME_ONREQUEST );
 
                     return true;
                 }
@@ -1334,7 +1335,7 @@ public class CompositeCache<K extends Se
                 // - The auxiliary is not alive
                 // - The auxiliary is remote and the invocation was remote
 
-                if ( aux == null || aux.getStatus() != CacheConstants.STATUS_ALIVE
+                if ( aux == null || aux.getStatus() != CacheStatus.ALIVE
                     || ( fromRemote && aux.getCacheType() == CacheType.REMOTE_CACHE ) )
                 {
                     if ( log.isInfoEnabled() )
@@ -1413,7 +1414,7 @@ public class CompositeCache<K extends Se
                 {
                     ICache<K, V> aux = auxCaches[i];
 
-                    if ( aux.getStatus() == CacheConstants.STATUS_ALIVE )
+                    if ( aux.getStatus() == CacheStatus.ALIVE )
                     {
 
                         Iterator<Map.Entry<K, MemoryElementDescriptor<K, V>>> itr =
@@ -1467,9 +1468,9 @@ public class CompositeCache<K extends Se
      * <p>
      * @return The status value
      */
-    public synchronized int getStatus()
+    public synchronized CacheStatus getStatus()
     {
-        return alive ? CacheConstants.STATUS_ALIVE : CacheConstants.STATUS_DISPOSED;
+        return alive ? CacheStatus.ALIVE : CacheStatus.DISPOSED;
     }
 
     /**
@@ -1688,7 +1689,7 @@ public class CompositeCache<K extends Se
      * @param ce
      * @param eventType
      */
-    private void handleElementEvent( ICacheElement<K, V> ce, int eventType )
+    private void handleElementEvent( ICacheElement<K, V> ce, ElementEventType eventType )
     {
         // handle event, might move to a new method
         ArrayList<IElementEventHandler> eventHandlers = ce.getElementAttributes().getElementEventHandlers();

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/ElementEvent.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/ElementEvent.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/ElementEvent.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/ElementEvent.java Wed Nov  7 17:19:03 2012
@@ -21,8 +21,8 @@ package org.apache.jcs.engine.control.ev
 
 import java.util.EventObject;
 
+import org.apache.jcs.engine.control.event.behavior.ElementEventType;
 import org.apache.jcs.engine.control.event.behavior.IElementEvent;
-import org.apache.jcs.engine.control.event.behavior.IElementEventConstants;
 
 /**
  * Element events will trigger the creation of Element Event objects. This is a wrapper around the
@@ -30,21 +30,21 @@ import org.apache.jcs.engine.control.eve
  */
 public class ElementEvent
     extends EventObject
-    implements IElementEventConstants, IElementEvent
+    implements IElementEvent
 {
     /** Don't change */
     private static final long serialVersionUID = -5364117411457467056L;
 
     /** default event code */
-    private int elementEvent = ElementEvent.ELEMENT_EVENT_EXCEEDED_MAXLIFE_BACKGROUND;
+    private ElementEventType elementEvent = ElementEventType.EXCEEDED_MAXLIFE_BACKGROUND;
 
     /**
      * Constructor for the ElementEvent object
      * <p>
      * @param source The Cache Element (should restrict?)
-     * @param elementEvent The event id defined in the constants class.
+     * @param elementEvent The event id defined in the enum class.
      */
-    public ElementEvent( Object source, int elementEvent )
+    public ElementEvent( Object source, ElementEventType elementEvent )
     {
         super( source );
         this.elementEvent = elementEvent;
@@ -53,9 +53,9 @@ public class ElementEvent
     /**
      * Gets the elementEvent attribute of the ElementEvent object
      * <p>
-     * @return The elementEvent value. The List of values is defined in IElementEventConstants.
+     * @return The elementEvent value. The List of values is defined in ElementEventType.
      */
-    public int getElementEvent()
+    public ElementEventType getElementEvent()
     {
         return elementEvent;
     }

Copied: commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/ElementEventType.java (from r1344803, commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/IElementEventConstants.java)
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/ElementEventType.java?p2=commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/ElementEventType.java&p1=commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/IElementEventConstants.java&r1=1344803&r2=1406724&rev=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/IElementEventConstants.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/ElementEventType.java Wed Nov  7 17:19:03 2012
@@ -22,33 +22,33 @@ package org.apache.jcs.engine.control.ev
 /**
  * This describes the events that an item can encounter.
  */
-public interface IElementEventConstants
+public enum ElementEventType
 {
     /** Background expiration */
-    public final static int ELEMENT_EVENT_EXCEEDED_MAXLIFE_BACKGROUND = 0;
+    EXCEEDED_MAXLIFE_BACKGROUND,
 
     /*** Expiration discovered on request */
-    public final static int ELEMENT_EVENT_EXCEEDED_MAXLIFE_ONREQUEST = 1;
+    EXCEEDED_MAXLIFE_ONREQUEST,
 
     /** Background expiration */
-    public final static int ELEMENT_EVENT_EXCEEDED_IDLETIME_BACKGROUND = 2;
+    EXCEEDED_IDLETIME_BACKGROUND,
 
     /** Expiration discovered on request */
-    public final static int ELEMENT_EVENT_EXCEEDED_IDLETIME_ONREQUEST = 3;
+    EXCEEDED_IDLETIME_ONREQUEST,
 
     /** Moving from memory to disk (what if no disk?) */
-    public final static int ELEMENT_EVENT_SPOOLED_DISK_AVAILABLE = 4;
+    SPOOLED_DISK_AVAILABLE,
 
     /** Moving from memory to disk (what if no disk?) */
-    public final static int ELEMENT_EVENT_SPOOLED_DISK_NOT_AVAILABLE = 5;
+    SPOOLED_DISK_NOT_AVAILABLE,
 
     /** Moving from memory to disk, but item is not spoolable */
-    public final static int ELEMENT_EVENT_SPOOLED_NOT_ALLOWED = 6;
+    SPOOLED_NOT_ALLOWED //,
 
     /** Removed actively by a remove command. (Could distinguish between local and remote) */
-    //public final static int ELEMENT_EVENT_REMOVED = 7;
+    //REMOVED,
     /**
      * Element was requested from cache. Not sure we ever want to implement this.
      */
-    //public final static int ELEMENT_EVENT_GET = 8;
+    //GET
 }

Propchange: commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/ElementEventType.java
------------------------------------------------------------------------------
    cvs2svn:cvs-rev = 1.6

Propchange: commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/ElementEventType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/ElementEventType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/IElementEvent.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/IElementEvent.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/IElementEvent.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/IElementEvent.java Wed Nov  7 17:19:03 2012
@@ -33,7 +33,7 @@ public interface IElementEvent
      *<p>
      * @return The elementEvent value
      */
-    public int getElementEvent();
+    public ElementEventType getElementEvent();
 
     /**
      * @return the source of the event.

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/IElementEventHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/IElementEventHandler.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/IElementEventHandler.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/control/event/behavior/IElementEventHandler.java Wed Nov  7 17:19:03 2012
@@ -29,9 +29,7 @@ package org.apache.jcs.engine.control.ev
  *
  */
 public interface IElementEventHandler
-    extends IElementEventConstants
 {
-
     /**
      * Handle events for this element. The events are typed.
      *
@@ -39,5 +37,4 @@ public interface IElementEventHandler
      *            The event created by the cache.
      */
     public void handleElementEvent( IElementEvent event );
-
 }

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/memory/AbstractMemoryCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/memory/AbstractMemoryCache.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/memory/AbstractMemoryCache.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/memory/AbstractMemoryCache.java Wed Nov  7 17:19:03 2012
@@ -33,7 +33,7 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.jcs.engine.CacheConstants;
+import org.apache.jcs.engine.CacheStatus;
 import org.apache.jcs.engine.behavior.ICacheElement;
 import org.apache.jcs.engine.behavior.ICompositeCacheAttributes;
 import org.apache.jcs.engine.behavior.IElementAttributes;
@@ -77,7 +77,7 @@ public abstract class AbstractMemoryCach
     public CompositeCache<K, V> cache;
 
     /** status */
-    protected int status;
+    protected CacheStatus status;
 
     /** How many to spool at a time. */
     protected int chunkSize;
@@ -99,7 +99,7 @@ public abstract class AbstractMemoryCach
         map = createMap();
 
         chunkSize = cacheAttributes.getSpoolChunkSize();
-        status = CacheConstants.STATUS_ALIVE;
+        status = CacheStatus.ALIVE;
 
         if ( cacheAttributes.getUseMemoryShrinker() )
         {
@@ -267,7 +267,7 @@ public abstract class AbstractMemoryCach
      * <p>
      * @return The status value
      */
-    public int getStatus()
+    public CacheStatus getStatus()
     {
         return this.status;
     }

Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/memory/shrinking/ShrinkerThread.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/memory/shrinking/ShrinkerThread.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/memory/shrinking/ShrinkerThread.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/engine/memory/shrinking/ShrinkerThread.java Wed Nov  7 17:19:03 2012
@@ -29,8 +29,8 @@ import org.apache.commons.logging.LogFac
 import org.apache.jcs.engine.behavior.ICacheElement;
 import org.apache.jcs.engine.behavior.IElementAttributes;
 import org.apache.jcs.engine.control.event.ElementEvent;
+import org.apache.jcs.engine.control.event.behavior.ElementEventType;
 import org.apache.jcs.engine.control.event.behavior.IElementEvent;
-import org.apache.jcs.engine.control.event.behavior.IElementEventConstants;
 import org.apache.jcs.engine.control.event.behavior.IElementEventHandler;
 import org.apache.jcs.engine.memory.behavior.IMemoryCache;
 
@@ -248,7 +248,7 @@ public class ShrinkerThread<K extends Se
                 log.info( "Exceeded maxLifeSeconds: " + cacheElement.getKey() );
             }
 
-            handleElementEvents( cacheElement, IElementEventConstants.ELEMENT_EVENT_EXCEEDED_MAXLIFE_BACKGROUND );
+            handleElementEvents( cacheElement, ElementEventType.EXCEEDED_MAXLIFE_BACKGROUND );
 
             return true;
         }
@@ -264,7 +264,7 @@ public class ShrinkerThread<K extends Se
                 log.info( "Exceeded maxIdleTime " + cacheElement.getKey() );
             }
 
-            handleElementEvents( cacheElement, IElementEventConstants.ELEMENT_EVENT_EXCEEDED_IDLETIME_BACKGROUND );
+            handleElementEvents( cacheElement, ElementEventType.EXCEEDED_IDLETIME_BACKGROUND );
 
             return true;
         }
@@ -279,7 +279,7 @@ public class ShrinkerThread<K extends Se
      * @param eventType Type of event to handle
      * @throws IOException If an error occurs
      */
-    private void handleElementEvents( ICacheElement<?, ?> cacheElement, int eventType )
+    private void handleElementEvents( ICacheElement<?, ?> cacheElement, ElementEventType eventType )
         throws IOException
     {
         IElementAttributes attributes = cacheElement.getElementAttributes();

Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/MockAuxiliaryCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/MockAuxiliaryCache.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/MockAuxiliaryCache.java (original)
+++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/MockAuxiliaryCache.java Wed Nov  7 17:19:03 2012
@@ -25,7 +25,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.jcs.engine.CacheConstants;
+import org.apache.jcs.engine.CacheStatus;
 import org.apache.jcs.engine.behavior.ICacheElement;
 import org.apache.jcs.engine.stats.behavior.IStats;
 
@@ -44,7 +44,7 @@ public class MockAuxiliaryCache<K extend
     public CacheType cacheType = CacheType.DISK_CACHE;
 
     /** Can setup status */
-    public int status = CacheConstants.STATUS_ALIVE;
+    public CacheStatus status = CacheStatus.ALIVE;
 
     /** Times getMatching was Called */
     public int getMatchingCallCount = 0;
@@ -140,7 +140,7 @@ public class MockAuxiliaryCache<K extend
     /**
      * @return int
      */
-    public int getStatus()
+    public CacheStatus getStatus()
     {
         return status;
     }

Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/AbstractDiskCacheUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/AbstractDiskCacheUnitTest.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/AbstractDiskCacheUnitTest.java (original)
+++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/AbstractDiskCacheUnitTest.java Wed Nov  7 17:19:03 2012
@@ -14,8 +14,8 @@ import org.apache.jcs.TestLogConfigurati
 import org.apache.jcs.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.jcs.auxiliary.disk.behavior.IDiskCacheAttributes;
 import org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes;
-import org.apache.jcs.engine.CacheConstants;
 import org.apache.jcs.engine.CacheElement;
+import org.apache.jcs.engine.CacheStatus;
 import org.apache.jcs.engine.ElementAttributes;
 import org.apache.jcs.engine.behavior.ICacheElement;
 import org.apache.jcs.engine.behavior.IElementAttributes;
@@ -81,7 +81,7 @@ public class AbstractDiskCacheUnitTest
 
         // VERIFY
         assertFalse( "disk cache should not be alive.", diskCache.alive );
-        assertEquals( "Status should be disposed", CacheConstants.STATUS_DISPOSED, diskCache.getStatus() );
+        assertEquals( "Status should be disposed", CacheStatus.DISPOSED, diskCache.getStatus() );
     }
 
     /**

Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/file/FileDiskCacheUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/file/FileDiskCacheUnitTest.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/file/FileDiskCacheUnitTest.java (original)
+++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/disk/file/FileDiskCacheUnitTest.java Wed Nov  7 17:19:03 2012
@@ -4,8 +4,8 @@ import java.io.File;
 
 import junit.framework.TestCase;
 
-import org.apache.jcs.engine.CacheConstants;
 import org.apache.jcs.engine.CacheElement;
+import org.apache.jcs.engine.CacheStatus;
 import org.apache.jcs.engine.behavior.ICacheElement;
 import org.apache.jcs.utils.timing.SleepUtil;
 
@@ -38,7 +38,7 @@ public class FileDiskCacheUnitTest
             .getAbsolutePath().indexOf( cacheName ) != -1 );
         assertTrue( "Directory should include the disk path. " + directory.getAbsolutePath(), directory
             .getAbsolutePath().indexOf( "DiskFileCacheUnitTest" ) != -1 );
-        assertTrue( "Should be alive", diskCache.getStatus() == CacheConstants.STATUS_ALIVE );
+        assertTrue( "Should be alive", diskCache.getStatus() == CacheStatus.ALIVE );
     }
 
     /**
@@ -60,7 +60,7 @@ public class FileDiskCacheUnitTest
         diskCache.dispose();
 
         // VERIFY
-        assertTrue( "Should not be alive", diskCache.getStatus() == CacheConstants.STATUS_DISPOSED );
+        assertTrue( "Should not be alive", diskCache.getStatus() == CacheStatus.DISPOSED );
     }
 
     /**
@@ -86,7 +86,7 @@ public class FileDiskCacheUnitTest
         // VERIFY
         assertNotNull( "Should have a directory", directory );
         assertFalse( "Should not have an existing directory", directory.exists() );
-        assertTrue( "Should not be alive", diskCache.getStatus() == CacheConstants.STATUS_DISPOSED );
+        assertTrue( "Should not be alive", diskCache.getStatus() == CacheStatus.DISPOSED );
     }
 
     /**

Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/MockLateralCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/MockLateralCache.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/MockLateralCache.java (original)
+++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/MockLateralCache.java Wed Nov  7 17:19:03 2012
@@ -24,6 +24,7 @@ import java.io.Serializable;
 
 import org.apache.jcs.auxiliary.lateral.LateralCache;
 import org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes;
+import org.apache.jcs.engine.CacheStatus;
 import org.apache.jcs.engine.behavior.ICache;
 import org.apache.jcs.engine.behavior.ICacheElement;
 
@@ -110,9 +111,9 @@ public class MockLateralCache<K extends 
 
     /** @return 0 */
     @Override
-    public int getStatus()
+    public CacheStatus getStatus()
     {
-        return 0;
+        return CacheStatus.ALIVE;
     }
 
     /** @return String */

Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/MockRemoteCacheClient.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/MockRemoteCacheClient.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/MockRemoteCacheClient.java (original)
+++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/MockRemoteCacheClient.java Wed Nov  7 17:19:03 2012
@@ -33,7 +33,7 @@ import org.apache.jcs.auxiliary.Abstract
 import org.apache.jcs.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheClient;
 import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheListener;
-import org.apache.jcs.engine.CacheConstants;
+import org.apache.jcs.engine.CacheStatus;
 import org.apache.jcs.engine.behavior.ICacheElement;
 import org.apache.jcs.engine.behavior.ICacheServiceNonLocal;
 import org.apache.jcs.engine.stats.behavior.IStats;
@@ -60,7 +60,7 @@ public class MockRemoteCacheClient<K ext
     public List<K> removeList = new LinkedList<K>();
 
     /** status to return. */
-    public int status = CacheConstants.STATUS_ALIVE;
+    public CacheStatus status = CacheStatus.ALIVE;
 
     /** Can setup values to return from get. values must be ICacheElement<K, V> */
     public Map<K, ICacheElement<K, V>> getSetupMap = new HashMap<K, ICacheElement<K,V>>();
@@ -181,7 +181,7 @@ public class MockRemoteCacheClient<K ext
      * Returns the status setup variable. (non-Javadoc)
      * @see org.apache.jcs.auxiliary.AuxiliaryCache#getStatus()
      */
-    public int getStatus()
+    public CacheStatus getStatus()
     {
         return status;
     }

Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheNoWaitUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheNoWaitUnitTest.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheNoWaitUnitTest.java (original)
+++ commons/proper/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheNoWaitUnitTest.java Wed Nov  7 17:19:03 2012
@@ -26,8 +26,8 @@ import java.util.Set;
 
 import junit.framework.TestCase;
 
-import org.apache.jcs.engine.CacheConstants;
 import org.apache.jcs.engine.CacheElement;
+import org.apache.jcs.engine.CacheStatus;
 import org.apache.jcs.engine.behavior.ICacheElement;
 import org.apache.jcs.engine.behavior.ICacheEventQueue;
 import org.apache.jcs.utils.timing.SleepUtil;
@@ -148,7 +148,7 @@ public class RemoteCacheNoWaitUnitTest
     {
         // SETUP
         MockRemoteCacheClient<String, String> client = new MockRemoteCacheClient<String, String>();
-        client.status = CacheConstants.STATUS_ALIVE;
+        client.status = CacheStatus.ALIVE;
         RemoteCacheNoWait<String, String> noWait = new RemoteCacheNoWait<String, String>( client );
 
         // DO WORK
@@ -168,14 +168,14 @@ public class RemoteCacheNoWaitUnitTest
     {
         // SETUP
         MockRemoteCacheClient<String, String> client = new MockRemoteCacheClient<String, String>();
-        client.status = CacheConstants.STATUS_ERROR;
+        client.status = CacheStatus.ERROR;
         RemoteCacheNoWait<String, String> noWait = new RemoteCacheNoWait<String, String>( client );
 
         // DO WORK
-        int result = noWait.getStatus();
+        CacheStatus result = noWait.getStatus();
 
         // VERIFY
-        assertEquals( "Wrong status", CacheConstants.STATUS_ERROR, result );
+        assertEquals( "Wrong status", CacheStatus.ERROR, result );
     }
 
     /**
@@ -189,7 +189,7 @@ public class RemoteCacheNoWaitUnitTest
     {
         // SETUP
         MockRemoteCacheClient<String, String> client = new MockRemoteCacheClient<String, String>();
-        client.status = CacheConstants.STATUS_ALIVE;
+        client.status = CacheStatus.ALIVE;
         RemoteCacheNoWait<String, String> noWait = new RemoteCacheNoWait<String, String>( client );
 
         MockRemoteCacheService<String, String> service = new MockRemoteCacheService<String, String>();

Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/CompositeCacheDiskUsageUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/CompositeCacheDiskUsageUnitTest.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/CompositeCacheDiskUsageUnitTest.java (original)
+++ commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/CompositeCacheDiskUsageUnitTest.java Wed Nov  7 17:19:03 2012
@@ -34,6 +34,7 @@ import org.apache.jcs.auxiliary.Abstract
 import org.apache.jcs.auxiliary.AuxiliaryCache;
 import org.apache.jcs.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.jcs.engine.CacheElement;
+import org.apache.jcs.engine.CacheStatus;
 import org.apache.jcs.engine.CompositeCacheAttributes;
 import org.apache.jcs.engine.ElementAttributes;
 import org.apache.jcs.engine.behavior.ICacheElement;
@@ -70,7 +71,7 @@ public class CompositeCacheDiskUsageUnit
         throws CacheException
     {
         JCS<String, String> swap = JCS.getInstance( "Swap" );
-        assertEquals( ICompositeCacheAttributes.DISK_USAGE_PATTERN_SWAP, swap.getCacheAttributes()
+        assertEquals( ICompositeCacheAttributes.DiskUsagePattern.SWAP, swap.getCacheAttributes()
             .getDiskUsagePattern() );
     }
 
@@ -83,7 +84,7 @@ public class CompositeCacheDiskUsageUnit
         throws CacheException
     {
         JCS<String, String> swap = JCS.getInstance( "Update" );
-        assertEquals( ICompositeCacheAttributes.DISK_USAGE_PATTERN_UPDATE, swap.getCacheAttributes()
+        assertEquals( ICompositeCacheAttributes.DiskUsagePattern.UPDATE, swap.getCacheAttributes()
             .getDiskUsagePattern() );
     }
 
@@ -95,7 +96,7 @@ public class CompositeCacheDiskUsageUnit
     {
         // SETUP
         ICompositeCacheAttributes cattr = new CompositeCacheAttributes();
-        cattr.setDiskUsagePattern( ICompositeCacheAttributes.DISK_USAGE_PATTERN_SWAP );
+        cattr.setDiskUsagePattern( ICompositeCacheAttributes.DiskUsagePattern.SWAP );
 
         IElementAttributes attr = new ElementAttributes();
 
@@ -126,7 +127,7 @@ public class CompositeCacheDiskUsageUnit
     {
         // SETUP
         ICompositeCacheAttributes cattr = new CompositeCacheAttributes();
-        cattr.setDiskUsagePattern( ICompositeCacheAttributes.DISK_USAGE_PATTERN_UPDATE );
+        cattr.setDiskUsagePattern( ICompositeCacheAttributes.DiskUsagePattern.UPDATE );
 
         IElementAttributes attr = new ElementAttributes();
 
@@ -161,7 +162,7 @@ public class CompositeCacheDiskUsageUnit
     {
         // SETUP
         ICompositeCacheAttributes cattr = new CompositeCacheAttributes();
-        cattr.setDiskUsagePattern( ICompositeCacheAttributes.DISK_USAGE_PATTERN_UPDATE );
+        cattr.setDiskUsagePattern( ICompositeCacheAttributes.DiskUsagePattern.UPDATE );
 
         IElementAttributes attr = new ElementAttributes();
 
@@ -198,7 +199,7 @@ public class CompositeCacheDiskUsageUnit
     {
         // SETUP
         ICompositeCacheAttributes cattr = new CompositeCacheAttributes();
-        cattr.setDiskUsagePattern( ICompositeCacheAttributes.DISK_USAGE_PATTERN_UPDATE );
+        cattr.setDiskUsagePattern( ICompositeCacheAttributes.DiskUsagePattern.UPDATE );
 
         IElementAttributes attr = new ElementAttributes();
 
@@ -235,7 +236,7 @@ public class CompositeCacheDiskUsageUnit
     {
         // SETUP
         ICompositeCacheAttributes cattr = new CompositeCacheAttributes();
-        cattr.setDiskUsagePattern( ICompositeCacheAttributes.DISK_USAGE_PATTERN_SWAP );
+        cattr.setDiskUsagePattern( ICompositeCacheAttributes.DiskUsagePattern.SWAP );
 
         IElementAttributes attr = new ElementAttributes();
 
@@ -270,7 +271,7 @@ public class CompositeCacheDiskUsageUnit
     {
         // SETUP
         ICompositeCacheAttributes cattr = new CompositeCacheAttributes();
-        cattr.setDiskUsagePattern( ICompositeCacheAttributes.DISK_USAGE_PATTERN_UPDATE );
+        cattr.setDiskUsagePattern( ICompositeCacheAttributes.DiskUsagePattern.UPDATE );
 
         IElementAttributes attr = new ElementAttributes();
 
@@ -392,9 +393,9 @@ public class CompositeCacheDiskUsageUnit
         }
 
         /** @return 0 */
-        public int getStatus()
+        public CacheStatus getStatus()
         {
-            return 0;
+            return CacheStatus.ALIVE;
         }
 
         /** @return null */

Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/event/ElementEventHandlerMockImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/event/ElementEventHandlerMockImpl.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/event/ElementEventHandlerMockImpl.java (original)
+++ commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/event/ElementEventHandlerMockImpl.java Wed Nov  7 17:19:03 2012
@@ -22,7 +22,7 @@ package org.apache.jcs.engine.control.ev
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.jcs.engine.control.event.behavior.IElementEvent;
-import org.apache.jcs.engine.control.event.behavior.IElementEventConstants;
+import org.apache.jcs.engine.control.event.behavior.ElementEventType;
 import org.apache.jcs.engine.control.event.behavior.IElementEventHandler;
 
 /**
@@ -65,23 +65,23 @@ public class ElementEventHandlerMockImpl
             log.debug( "/n/n EVENT CODE = " + event.getElementEvent() + " ***************************" );
         }
 
-        if ( event.getElementEvent() == IElementEventConstants.ELEMENT_EVENT_SPOOLED_DISK_AVAILABLE )
+        if ( event.getElementEvent() == ElementEventType.SPOOLED_DISK_AVAILABLE )
         {
             setSpoolCount( getSpoolCount() + 1 );
         }
-        else if ( event.getElementEvent() == IElementEventConstants.ELEMENT_EVENT_SPOOLED_NOT_ALLOWED )
+        else if ( event.getElementEvent() == ElementEventType.SPOOLED_NOT_ALLOWED )
         {
             setSpoolNotAllowedCount( getSpoolNotAllowedCount() + 1 );
         }
-        else if ( event.getElementEvent() == IElementEventConstants.ELEMENT_EVENT_SPOOLED_DISK_NOT_AVAILABLE )
+        else if ( event.getElementEvent() == ElementEventType.SPOOLED_DISK_NOT_AVAILABLE )
         {
             setSpoolNoDiskCount( getSpoolNoDiskCount() + 1 );
         }
-        else if ( event.getElementEvent() == IElementEventConstants.ELEMENT_EVENT_EXCEEDED_MAXLIFE_BACKGROUND )
+        else if ( event.getElementEvent() == ElementEventType.EXCEEDED_MAXLIFE_BACKGROUND )
         {
             setExceededMaxLifeBackgroundCount( getExceededMaxLifeBackgroundCount() + 1 );
         }
-        else if ( event.getElementEvent() == IElementEventConstants.ELEMENT_EVENT_EXCEEDED_IDLETIME_BACKGROUND )
+        else if ( event.getElementEvent() == ElementEventType.EXCEEDED_IDLETIME_BACKGROUND )
         {
             setExceededIdleTimeBackgroundCount( getExceededIdleTimeBackgroundCount() + 1 );
         }

Modified: commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/event/SimpleEventHandlingUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/event/SimpleEventHandlingUnitTest.java?rev=1406724&r1=1406723&r2=1406724&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/event/SimpleEventHandlingUnitTest.java (original)
+++ commons/proper/jcs/trunk/src/test/org/apache/jcs/engine/control/event/SimpleEventHandlingUnitTest.java Wed Nov  7 17:19:03 2012
@@ -24,7 +24,7 @@ import junit.framework.TestCase;
 import org.apache.jcs.JCS;
 import org.apache.jcs.engine.behavior.IElementAttributes;
 import org.apache.jcs.engine.control.event.behavior.IElementEvent;
-import org.apache.jcs.engine.control.event.behavior.IElementEventConstants;
+import org.apache.jcs.engine.control.event.behavior.ElementEventType;
 import org.apache.jcs.engine.control.event.behavior.IElementEventHandler;
 
 /**
@@ -195,17 +195,17 @@ public class SimpleEventHandlingUnitTest
             //System.out.println( "Handling Event of Type " +
             // event.getElementEvent() );
 
-            if ( event.getElementEvent() == IElementEventConstants.ELEMENT_EVENT_SPOOLED_DISK_AVAILABLE )
+            if ( event.getElementEvent() == ElementEventType.SPOOLED_DISK_AVAILABLE )
             {
                 //System.out.println( "Handling Event of Type
                 // ELEMENT_EVENT_SPOOLED_DISK_AVAILABLE, " + getSpoolCount() );
                 setSpoolCount( getSpoolCount() + 1 );
             }
-            else if ( event.getElementEvent() == IElementEventConstants.ELEMENT_EVENT_SPOOLED_NOT_ALLOWED )
+            else if ( event.getElementEvent() == ElementEventType.SPOOLED_NOT_ALLOWED )
             {
                 setSpoolNotAllowedCount( getSpoolNotAllowedCount() + 1 );
             }
-            else if ( event.getElementEvent() == IElementEventConstants.ELEMENT_EVENT_SPOOLED_DISK_NOT_AVAILABLE )
+            else if ( event.getElementEvent() == ElementEventType.SPOOLED_DISK_NOT_AVAILABLE )
             {
                 setSpoolNoDiskCount( getSpoolNoDiskCount() + 1 );
             }



Mime
View raw message