You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tv...@apache.org on 2014/03/29 19:36:21 UTC
svn commit: r1583038 [1/2] - in /commons/proper/jcs/trunk/src:
java/org/apache/commons/jcs/access/
java/org/apache/commons/jcs/access/behavior/
java/org/apache/commons/jcs/admin/ java/org/apache/commons/jcs/auxiliary/
java/org/apache/commons/jcs/auxili...
Author: tv
Date: Sat Mar 29 18:36:20 2014
New Revision: 1583038
URL: http://svn.apache.org/r1583038
Log:
Clean up some PMD complaints
Removed:
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/behavior/IRemoteCacheServiceAdmin.java
Modified:
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/access/PartitionedCacheAccess.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/access/behavior/IGroupCacheAccess.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/admin/JCSAdminBean.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCache.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCacheAttributes.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCacheEventLogging.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheAttributes.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheFactory.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheManager.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/AbstractDiskCache.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/behavior/IDiskCacheAttributes.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskCache.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCache.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/indexed/IndexedDiskCache.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/LateralCacheAttributes.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/LateralCacheNoWaitFacade.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/behavior/ILateralCacheAttributes.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListener.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/behavior/ITCPLateralCacheAttributes.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/AbstractRemoteAuxiliaryCache.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/RemoteCache.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/behavior/IRemoteCacheClient.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/behavior/IRemoteCacheListener.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServer.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServerFactory.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/CacheEventQueue.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/CacheEventQueueFactory.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/PooledCacheEventQueue.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheElement.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheElementSerialized.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheEventQueue.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheListener.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheManager.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheService.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheServiceAdmin.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheType.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/IShutdownObservable.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/control/event/behavior/IElementEvent.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/control/event/behavior/IElementEventHandler.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/control/event/behavior/IElementEventQueue.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/logging/behavior/ICacheEvent.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/logging/behavior/ICacheEventLogger.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/stats/behavior/ICacheStats.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/stats/behavior/IStatElement.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/stats/behavior/IStats.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/utils/access/JCSWorkerHelper.java
commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/utils/discovery/behavior/IDiscoveryListener.java
commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListenerUnitTest.java
commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/TestTCPLateralUnitTest.java
commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/engine/CacheEventQueueFactoryUnitTest.java
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/access/PartitionedCacheAccess.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/access/PartitionedCacheAccess.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/access/PartitionedCacheAccess.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/access/PartitionedCacheAccess.java Sat Mar 29 18:36:20 2014
@@ -114,7 +114,7 @@ public class PartitionedCacheAccess<K ex
catch ( CacheException e )
{
log.error( "Problem putting value for key [" + key + "] in cache [" + partitions[partition] + "]" );
- throw ( e );
+ throw e;
}
}
@@ -173,7 +173,7 @@ public class PartitionedCacheAccess<K ex
catch ( CacheException e )
{
log.error( "Problem putting value for key [" + key + "] in cache [" + partitions[partition] + "]" );
- throw ( e );
+ throw e;
}
}
@@ -354,7 +354,7 @@ public class PartitionedCacheAccess<K ex
catch ( CacheException e )
{
log.error( "Problem removing value for key [" + key + "] in cache [" + partitions[partition] + "]" );
- throw ( e );
+ throw e;
}
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/access/behavior/IGroupCacheAccess.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/access/behavior/IGroupCacheAccess.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/access/behavior/IGroupCacheAccess.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/access/behavior/IGroupCacheAccess.java Sat Mar 29 18:36:20 2014
@@ -71,7 +71,7 @@ public interface IGroupCacheAccess<K ext
* @param name
* @param group
*/
- public void removeFromGroup( K name, String group );
+ void removeFromGroup( K name, String group );
/**
* Gets the set of keys of objects currently in the group
@@ -79,12 +79,12 @@ public interface IGroupCacheAccess<K ext
* @param group
* @return the set of group keys.
*/
- public Set<K> getGroupKeys( String group );
+ Set<K> getGroupKeys( String group );
/**
* Invalidates a group
* <p>
* @param group
*/
- public void invalidateGroup( String group );
+ void invalidateGroup( String group );
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/admin/JCSAdminBean.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/admin/JCSAdminBean.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/admin/JCSAdminBean.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/admin/JCSAdminBean.java Sat Mar 29 18:36:20 2014
@@ -122,7 +122,7 @@ public class JCSAdminBean implements JCS
attributes.getIsEternal(),
format.format(new Date(attributes.getCreateTime())),
attributes.getMaxLifeSeconds(),
- (now - attributes.getCreateTime() - (attributes.getMaxLifeSeconds() * 1000 )) / -1000);
+ (now - attributes.getCreateTime() - attributes.getMaxLifeSeconds() * 1000 ) / -1000);
records.add( elementInfo );
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCache.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCache.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCache.java Sat Mar 29 18:36:20 2014
@@ -34,9 +34,6 @@ import org.apache.commons.jcs.utils.seri
public abstract class AbstractAuxiliaryCache<K extends Serializable, V extends Serializable>
implements AuxiliaryCache<K, V>
{
- /** Don't change. */
- private static final long serialVersionUID = -1285708398502576617L;
-
/** An optional event logger */
protected ICacheEventLogger cacheEventLogger;
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCacheAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCacheAttributes.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCacheAttributes.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCacheAttributes.java Sat Mar 29 18:36:20 2014
@@ -1,5 +1,7 @@
package org.apache.commons.jcs.auxiliary;
+import org.apache.commons.jcs.engine.behavior.ICacheEventQueue;
+
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -34,8 +36,8 @@ public abstract class AbstractAuxiliaryC
/** name */
protected String name;
- /** eventQueueType -- custom classname, pooled, or single threaded */
- protected String eventQueueType;
+ /** eventQueueType -- pooled, or single threaded */
+ protected ICacheEventQueue.QueueType eventQueueType;
/** Named when pooled */
protected String eventQueuePoolName;
@@ -81,9 +83,9 @@ public abstract class AbstractAuxiliaryC
/**
* SINGLE is the default. If you choose POOLED, the value of EventQueuePoolName will be used
* <p>
- * @param queueType SINGLE or POOLED or a classname
+ * @param queueType SINGLE or POOLED
*/
- public void setEventQueueType( String queueType )
+ public void setEventQueueType( ICacheEventQueue.QueueType queueType )
{
this.eventQueueType = queueType;
}
@@ -91,7 +93,7 @@ public abstract class AbstractAuxiliaryC
/**
* @return SINGLE or POOLED
*/
- public String getEventQueueType()
+ public ICacheEventQueue.QueueType getEventQueueType()
{
return eventQueueType;
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCacheEventLogging.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCacheEventLogging.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCacheEventLogging.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCacheEventLogging.java Sat Mar 29 18:36:20 2014
@@ -37,9 +37,6 @@ import org.apache.commons.jcs.engine.log
public abstract class AbstractAuxiliaryCacheEventLogging<K extends Serializable, V extends Serializable>
extends AbstractAuxiliaryCache<K, V>
{
- /** Don't change. */
- private static final long serialVersionUID = -3921738303365238919L;
-
/**
* Puts an item into the cache.
* <p>
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheAttributes.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheAttributes.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheAttributes.java Sat Mar 29 18:36:20 2014
@@ -21,59 +21,54 @@ package org.apache.commons.jcs.auxiliary
import java.io.Serializable;
+import org.apache.commons.jcs.engine.behavior.ICacheEventQueue;
+
/**
* This is a nominal interface that auxiliary cache attributes should implement. This allows the
* auxiliary mangers to share a common interface.
*/
public interface AuxiliaryCacheAttributes
- extends Cloneable, Serializable
+ extends Serializable
{
- /** Does not use a thread pool. */
- public static final String SINGLE_QUEUE_TYPE = "SINGLE";
-
- /** Uses a thread pool. */
- public static final String POOLED_QUEUE_TYPE = "POOLED";
-
-
/**
* Sets the name of the cache, referenced by the appropriate manager.
* <p>
* @param s The new cacheName value
*/
- public void setCacheName( String s );
+ void setCacheName( String s );
/**
* Gets the cacheName attribute of the AuxiliaryCacheAttributes object
* <p>
* @return The cacheName value
*/
- public String getCacheName();
+ String getCacheName();
/**
* Name known by by configurator
* <p>
* @param s The new name value
*/
- public void setName( String s );
+ void setName( String s );
/**
* Gets the name attribute of the AuxiliaryCacheAttributes object
* <p>
* @return The name value
*/
- public String getName();
+ String getName();
/**
* SINGLE is the default. If you choose POOLED, the value of EventQueuePoolName will be used
* <p>
* @param s SINGLE or POOLED
*/
- public void setEventQueueType( String s );
+ void setEventQueueType( ICacheEventQueue.QueueType s );
/**
* @return SINGLE or POOLED
*/
- public String getEventQueueType();
+ ICacheEventQueue.QueueType getEventQueueType();
/**
* If you choose a POOLED event queue type, the value of EventQueuePoolName will be used. This
@@ -81,7 +76,7 @@ public interface AuxiliaryCacheAttribute
* <p>
* @param s SINGLE or POOLED
*/
- public void setEventQueuePoolName( String s );
+ void setEventQueuePoolName( String s );
/**
* Sets the pool name to use. If a pool is not found by this name, the thread pool manager will
@@ -89,12 +84,12 @@ public interface AuxiliaryCacheAttribute
* <p>
* @return name of thread pool to use for this auxiliary
*/
- public String getEventQueuePoolName();
+ String getEventQueuePoolName();
/**
* Clones
* <p>
* @return a copy
*/
- public AuxiliaryCacheAttributes copy();
+ AuxiliaryCacheAttributes copy();
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheFactory.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheFactory.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheFactory.java Sat Mar 29 18:36:20 2014
@@ -41,7 +41,7 @@ public interface AuxiliaryCacheFactory
* @param elementSerializer
* @return AuxiliaryCache
*/
- public <K extends Serializable, V extends Serializable> AuxiliaryCache<K, V> createCache(
+ <K extends Serializable, V extends Serializable> AuxiliaryCache<K, V> createCache(
AuxiliaryCacheAttributes attr, ICompositeCacheManager cacheMgr,
ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer );
@@ -50,12 +50,12 @@ public interface AuxiliaryCacheFactory
* <p>
* @param s The new name value
*/
- public void setName( String s );
+ void setName( String s );
/**
* Gets the name attribute of the AuxiliaryCacheFactory object
* <p>
* @return The name value
*/
- public String getName();
+ String getName();
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheManager.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheManager.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheManager.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/AuxiliaryCacheManager.java Sat Mar 29 18:36:20 2014
@@ -32,7 +32,7 @@ public interface AuxiliaryCacheManager
* @param cacheName
* @return AuxiliaryCache
*/
- public <K extends Serializable, V extends Serializable> AuxiliaryCache<K, V> getCache( String cacheName );
+ <K extends Serializable, V extends Serializable> AuxiliaryCache<K, V> getCache( String cacheName );
/**
* This allows the cache manager to be plugged into the auxiliary caches,
@@ -43,6 +43,6 @@ public interface AuxiliaryCacheManager
* @param cacheManager
* @return AuxiliaryCache
*/
- //public AuxiliaryCache getCache( String cacheName, ICompositeCacheManager
+ //AuxiliaryCache getCache( String cacheName, ICompositeCacheManager
// cacheManager );
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/AbstractDiskCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/AbstractDiskCache.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/AbstractDiskCache.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/AbstractDiskCache.java Sat Mar 29 18:36:20 2014
@@ -63,9 +63,6 @@ public abstract class AbstractDiskCache<
extends AbstractAuxiliaryCacheEventLogging<K, V>
implements AuxiliaryCache<K, V>
{
- /** Don't change. */
- private static final long serialVersionUID = 6541664080877628324L;
-
/** The logger */
protected static final Log log = LogFactory.getLog( AbstractDiskCache.class );
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/behavior/IDiskCacheAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/behavior/IDiskCacheAttributes.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/behavior/IDiskCacheAttributes.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/behavior/IDiskCacheAttributes.java Sat Mar 29 18:36:20 2014
@@ -32,7 +32,7 @@ public interface IDiskCacheAttributes
* items to be spooled are temporarily stored. It basically provides access
* to items on the to-be-spooled queue.
*/
- public static final int MAX_PURGATORY_SIZE_DEFUALT = 5000;
+ int MAX_PURGATORY_SIZE_DEFUALT = 5000;
/**
* Sets the diskPath attribute of the IJISPCacheAttributes object
@@ -40,21 +40,21 @@ public interface IDiskCacheAttributes
* @param path
* The new diskPath value
*/
- public void setDiskPath( String path );
+ void setDiskPath( String path );
/**
* Gets the diskPath attribute of the attributes object
* <p>
* @return The diskPath value
*/
- public String getDiskPath();
+ String getDiskPath();
/**
* Gets the maxKeySize attribute of the DiskCacheAttributes object
* <p>
* @return The maxPurgatorySize value
*/
- public int getMaxPurgatorySize();
+ int getMaxPurgatorySize();
/**
* Sets the maxPurgatorySize attribute of the DiskCacheAttributes object
@@ -62,7 +62,7 @@ public interface IDiskCacheAttributes
* @param maxPurgatorySize
* The new maxPurgatorySize value
*/
- public void setMaxPurgatorySize( int maxPurgatorySize );
+ void setMaxPurgatorySize( int maxPurgatorySize );
/**
* Get the amount of time in seconds we will wait for elements to move to
@@ -70,7 +70,7 @@ public interface IDiskCacheAttributes
* <p>
* @return the time in seconds.
*/
- public int getShutdownSpoolTimeLimit();
+ int getShutdownSpoolTimeLimit();
/**
* Sets the amount of time in seconds we will wait for elements to move to
@@ -83,14 +83,14 @@ public interface IDiskCacheAttributes
* @param shutdownSpoolTimeLimit
* the time in seconds
*/
- public void setShutdownSpoolTimeLimit( int shutdownSpoolTimeLimit );
+ void setShutdownSpoolTimeLimit( int shutdownSpoolTimeLimit );
/**
* If this is true then remove all is not prohibited.
* <p>
* @return boolean
*/
- public boolean isAllowRemoveAll();
+ boolean isAllowRemoveAll();
/**
* If this is false, then remove all requests will not be honored.
@@ -99,5 +99,5 @@ public interface IDiskCacheAttributes
* <p>
* @param allowRemoveAll
*/
- public void setAllowRemoveAll( boolean allowRemoveAll );
+ void setAllowRemoveAll( boolean allowRemoveAll );
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskCache.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskCache.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskCache.java Sat Mar 29 18:36:20 2014
@@ -491,8 +491,8 @@ public class BlockDiskCache<K extends Se
{
// remove single item.
int[] ded = this.keyStore.remove( key );
- removed = ( ded != null );
- if ( ded != null )
+ removed = ded != null;
+ if ( removed )
{
this.dataFile.freeBlocks( ded );
}
@@ -525,7 +525,6 @@ public class BlockDiskCache<K extends Se
/**
* Resets the keyfile, the disk file, and the memory key map.
* <p>
- * (non-Javadoc)
* @see org.apache.commons.jcs.auxiliary.disk.AbstractDiskCache#doRemoveAll()
*/
@Override
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCache.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCache.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCache.java Sat Mar 29 18:36:20 2014
@@ -421,7 +421,7 @@ public class FileDiskCache<K extends Ser
finally
{
silentClose( os );
- if ( ( tmp != null ) && tmp.exists() )
+ if ( tmp != null && tmp.exists() )
{
deleteWithRetry( tmp );
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/indexed/IndexedDiskCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/indexed/IndexedDiskCache.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/indexed/IndexedDiskCache.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/indexed/IndexedDiskCache.java Sat Mar 29 18:36:20 2014
@@ -64,9 +64,6 @@ import org.apache.commons.logging.LogFac
public class IndexedDiskCache<K extends Serializable, V extends Serializable>
extends AbstractDiskCache<K, V>
{
- /** Don't change */
- private static final long serialVersionUID = -265035607729729629L;
-
/** The logger */
protected static final Log log = LogFactory.getLog( IndexedDiskCache.class );
@@ -232,7 +229,6 @@ public class IndexedDiskCache<K extends
throws FileNotFoundException, IOException, InterruptedException
{
this.dataFile = new IndexedDisk( new File( rafDir, fileName + ".data" ), getElementSerializer() );
-
this.keyFile = new IndexedDisk( new File( rafDir, fileName + ".key" ), getElementSerializer() );
if ( cattr.isClearDiskOnStartup() )
@@ -389,7 +385,7 @@ public class IndexedDiskCache<K extends
{
IndexedDiskElementDescriptor ded = e.getValue();
- isOk = ( ded.pos + IndexedDisk.HEADER_SIZE_BYTES + ded.len <= fileLength );
+ isOk = ded.pos + IndexedDisk.HEADER_SIZE_BYTES + ded.len <= fileLength;
if ( !isOk )
{
@@ -915,7 +911,7 @@ public class IndexedDiskCache<K extends
boolean removed;
// remove single item.
IndexedDiskElementDescriptor ded = keyHash.remove( key );
- removed = ( ded != null );
+ removed = ded != null;
addToRecycleBin( ded );
if ( log.isDebugEnabled() )
@@ -1169,7 +1165,7 @@ public class IndexedDiskCache<K extends
*/
protected void doOptimizeRealTime()
{
- if ( isRealTimeOptimizationEnabled && !isOptimizing && ( removeCount++ >= cattr.getOptimizeAtRemoveCount() ) )
+ if ( isRealTimeOptimizationEnabled && !isOptimizing && removeCount++ >= cattr.getOptimizeAtRemoveCount() )
{
isOptimizing = true;
@@ -1513,7 +1509,7 @@ public class IndexedDiskCache<K extends
IndexedDiskElementDescriptor ded = e.getValue();
log.debug( logCacheName + "[dump] Disk element, key: " + key + ", pos: " + ded.pos + ", ded.len"
- + ded.len + ( ( dumpValues ) ? ( ", val: " + get( key ) ) : "" ) );
+ + ded.len + ( dumpValues ? ", val: " + get( key ) : "" ) );
}
}
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/LateralCacheAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/LateralCacheAttributes.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/LateralCacheAttributes.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/LateralCacheAttributes.java Sat Mar 29 18:36:20 2014
@@ -42,9 +42,9 @@ public class LateralCacheAttributes
private String transmissionTypeName = "UDP";
/** indicates the lateral type, this needs to change */
- private int transmissionType = UDP;
+ private Type transmissionType = Type.UDP;
- /** The heep servers */
+ /** The http servers */
private String httpServers;
/** used to identify the service that this manager will be operating on */
@@ -166,32 +166,17 @@ public class LateralCacheAttributes
* Sets the transmissionType attribute of the LateralCacheAttributes object
* @param val The new transmissionType value
*/
- public void setTransmissionType( int val )
+ public void setTransmissionType( Type val )
{
this.transmissionType = val;
- if ( val == UDP )
- {
- transmissionTypeName = "UDP";
- }
- else if ( val == HTTP )
- {
- transmissionTypeName = "HTTP";
- }
- else if ( val == TCP )
- {
- transmissionTypeName = "TCP";
- }
- else if ( val == XMLRPC )
- {
- transmissionTypeName = "XMLRPC";
- }
+ this.transmissionTypeName = val.toString();
}
/**
* Gets the transmissionType attribute of the LateralCacheAttributes object
* @return The transmissionType value
*/
- public int getTransmissionType()
+ public Type getTransmissionType()
{
return this.transmissionType;
}
@@ -203,22 +188,7 @@ public class LateralCacheAttributes
public void setTransmissionTypeName( String val )
{
this.transmissionTypeName = val;
- if ( val.equals( "UDP" ) )
- {
- transmissionType = UDP;
- }
- else if ( val.equals( "HTTP" ) )
- {
- transmissionType = HTTP;
- }
- else if ( val.equals( "TCP" ) )
- {
- transmissionType = TCP;
- }
- else if ( val.equals( "XMLRPC" ) )
- {
- transmissionType = XMLRPC;
- }
+ this.transmissionType = Type.valueOf(val);
}
/**
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/LateralCacheNoWaitFacade.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/LateralCacheNoWaitFacade.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/LateralCacheNoWaitFacade.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/LateralCacheNoWaitFacade.java Sat Mar 29 18:36:20 2014
@@ -423,7 +423,7 @@ public class LateralCacheNoWaitFacade<K
return CacheStatus.DISPOSED;
}
- if ((noWaits.length == 0) || (listener != null))
+ if (noWaits.length == 0 || listener != null)
{
return CacheStatus.ALIVE;
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/behavior/ILateralCacheAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/behavior/ILateralCacheAttributes.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/behavior/ILateralCacheAttributes.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/behavior/ILateralCacheAttributes.java Sat Mar 29 18:36:20 2014
@@ -32,121 +32,124 @@ import org.apache.commons.jcs.auxiliary.
public interface ILateralCacheAttributes
extends Serializable, AuxiliaryCacheAttributes
{
- /** HTTP type */
- final static int HTTP = 1;
-
- /** UDP type */
- final static int UDP = 2;
-
- /** TCP type */
- final static int TCP = 3;
-
- /** XMLRPC type */
- final static int XMLRPC = 4;
+ enum Type
+ {
+ /** HTTP type */
+ HTTP, // 1
+
+ /** UDP type */
+ UDP, // 2
+
+ /** TCP type */
+ TCP, // 3
+
+ /** XMLRPC type */
+ XMLRPC // 4
+ }
/**
* The number of elements the zombie queue will hold. This queue is used to store events if we
* loose our connection with the server.
*/
- public static final int DEFAULT_ZOMBIE_QUEUE_MAX_SIZE = 1000;
+ int DEFAULT_ZOMBIE_QUEUE_MAX_SIZE = 1000;
/**
* Sets the httpServer attribute of the ILateralCacheAttributes object
* <p>
* @param val The new httpServer value
*/
- public void setHttpServer( String val );
+ void setHttpServer( String val );
/**
* Gets the httpServer attribute of the ILateralCacheAttributes object
* <p>
* @return The httpServer value
*/
- public String getHttpServer();
+ String getHttpServer();
/**
* Sets the httpListenerPort attribute of the ILateralCacheAttributes object
* <p>
* @param val The new tcpListenerPort value
*/
- public void setHttpListenerPort( int val );
+ void setHttpListenerPort( int val );
/**
* Gets the httpListenerPort attribute of the ILateralCacheAttributes object
* <p>
* @return The httpListenerPort value
*/
- public int getHttpListenerPort();
+ int getHttpListenerPort();
/**
* Sets the httpServers attribute of the LateralCacheAttributes object
* <p>
* @param val The new httpServers value
*/
- public void setHttpServers( String val );
+ void setHttpServers( String val );
/**
* Gets the httpSrvers attribute of the LateralCacheAttributes object
* <p>
* @return The httpServers value
*/
- public String getHttpServers();
+ String getHttpServers();
/**
* Sets the udpMulticastAddr attribute of the ILateralCacheAttributes object
* <p>
* @param val The new udpMulticastAddr value
*/
- public void setUdpMulticastAddr( String val );
+ void setUdpMulticastAddr( String val );
/**
* Gets the udpMulticastAddr attribute of the ILateralCacheAttributes object
* <p>
* @return The udpMulticastAddr value
*/
- public String getUdpMulticastAddr();
+ String getUdpMulticastAddr();
/**
* Sets the udpMulticastPort attribute of the ILateralCacheAttributes object
* <p>
* @param val The new udpMulticastPort value
*/
- public void setUdpMulticastPort( int val );
+ void setUdpMulticastPort( int val );
/**
* Gets the udpMulticastPort attribute of the ILateralCacheAttributes object
* <p>
* @return The udpMulticastPort value
*/
- public int getUdpMulticastPort();
+ int getUdpMulticastPort();
/**
* Sets the transmissionType attribute of the ILateralCacheAttributes object
* <p>
* @param val The new transmissionType value
*/
- public void setTransmissionType( int val );
+ void setTransmissionType( Type val );
/**
* Gets the transmissionType attribute of the ILateralCacheAttributes object
* <p>
* @return The transmissionType value
*/
- public int getTransmissionType();
+ Type getTransmissionType();
/**
* Sets the transmissionTypeName attribute of the ILateralCacheAttributes object
* <p>
* @param val The new transmissionTypeName value
*/
- public void setTransmissionTypeName( String val );
+ void setTransmissionTypeName( String val );
/**
* Gets the transmissionTypeName attribute of the ILateralCacheAttributes object
* <p>
* @return The transmissionTypeName value
*/
- public String getTransmissionTypeName();
+ String getTransmissionTypeName();
/**
* Sets the putOnlyMode attribute of the ILateralCacheAttributes. When this is true the lateral
@@ -155,17 +158,17 @@ public interface ILateralCacheAttributes
* <p>
* @param val The new transmissionTypeName value
*/
- public void setPutOnlyMode( boolean val );
+ void setPutOnlyMode( boolean val );
/**
* @return The outgoingOnlyMode value. Stops gets from going remote.
*/
- public boolean getPutOnlyMode();
+ boolean getPutOnlyMode();
/**
* @param receive The receive to set.
*/
- public void setReceive( boolean receive );
+ void setReceive( boolean receive );
/**
* Should a listener be created. By default this is true.
@@ -179,7 +182,7 @@ public interface ILateralCacheAttributes
* <p>
* @return true if we should have a listener connection
*/
- public boolean isReceive();
+ boolean isReceive();
/**
* The number of elements the zombie queue will hold. This queue is used to store events if we
@@ -187,7 +190,7 @@ public interface ILateralCacheAttributes
* <p>
* @param zombieQueueMaxSize The zombieQueueMaxSize to set.
*/
- public void setZombieQueueMaxSize( int zombieQueueMaxSize );
+ void setZombieQueueMaxSize( int zombieQueueMaxSize );
/**
* The number of elements the zombie queue will hold. This queue is used to store events if we
@@ -195,5 +198,5 @@ public interface ILateralCacheAttributes
* <p>
* @return Returns the zombieQueueMaxSize.
*/
- public int getZombieQueueMaxSize();
+ int getZombieQueueMaxSize();
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListener.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListener.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListener.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListener.java Sat Mar 29 18:36:20 2014
@@ -346,7 +346,7 @@ public class LateralTCPDiscoveryListener
private LateralTCPCacheManager findManagerForServiceEndPoint( DiscoveredService service )
{
ITCPLateralCacheAttributes lca = new TCPLateralCacheAttributes();
- lca.setTransmissionType( LateralCacheAttributes.TCP );
+ lca.setTransmissionType( LateralCacheAttributes.Type.TCP );
lca.setTcpServer( service.getServiceAddress() + ":" + service.getServicePort() );
LateralTCPCacheManager lcm = LateralTCPCacheManager.getInstance( lca, cacheMgr, cacheEventLogger,
elementSerializer );
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/behavior/ITCPLateralCacheAttributes.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/behavior/ITCPLateralCacheAttributes.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/behavior/ITCPLateralCacheAttributes.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/behavior/ITCPLateralCacheAttributes.java Sat Mar 29 18:36:20 2014
@@ -37,14 +37,14 @@ public interface ITCPLateralCacheAttribu
* @param val
* The new tcpServer value
*/
- public void setTcpServer( String val );
+ void setTcpServer( String val );
/**
* Gets the tcpServer attribute of the ILateralCacheAttributes object
* <p>
* @return The tcpServer value
*/
- public String getTcpServer();
+ String getTcpServer();
/**
* Sets the tcpServers attribute of the ILateralCacheAttributes object
@@ -52,14 +52,14 @@ public interface ITCPLateralCacheAttribu
* @param val
* The new tcpServers value
*/
- public void setTcpServers( String val );
+ void setTcpServers( String val );
/**
* Gets the tcpServers attribute of the ILateralCacheAttributes object
* <p>
* @return The tcpServers value
*/
- public String getTcpServers();
+ String getTcpServers();
/**
* Sets the tcpListenerPort attribute of the ILateralCacheAttributes object
@@ -67,14 +67,14 @@ public interface ITCPLateralCacheAttribu
* @param val
* The new tcpListenerPort value
*/
- public void setTcpListenerPort( int val );
+ void setTcpListenerPort( int val );
/**
* Gets the tcpListenerPort attribute of the ILateralCacheAttributes object
* <p>
* @return The tcpListenerPort value
*/
- public int getTcpListenerPort();
+ int getTcpListenerPort();
/**
* Can setup UDP Discovery. This only works for TCp laterals right now. It
@@ -84,7 +84,7 @@ public interface ITCPLateralCacheAttribu
* @param udpDiscoveryEnabled
* The udpDiscoveryEnabled to set.
*/
- public void setUdpDiscoveryEnabled( boolean udpDiscoveryEnabled );
+ void setUdpDiscoveryEnabled( boolean udpDiscoveryEnabled );
/**
* Whether or not TCP laterals can try to find each other by multicast
@@ -92,14 +92,14 @@ public interface ITCPLateralCacheAttribu
* <p>
* @return Returns the udpDiscoveryEnabled.
*/
- public boolean isUdpDiscoveryEnabled();
+ boolean isUdpDiscoveryEnabled();
/**
* The port to use if UDPDiscovery is enabled.
* <p>
* @return Returns the udpDiscoveryPort.
*/
- public int getUdpDiscoveryPort();
+ int getUdpDiscoveryPort();
/**
* Sets the port to use if UDPDiscovery is enabled.
@@ -107,14 +107,14 @@ public interface ITCPLateralCacheAttribu
* @param udpDiscoveryPort
* The udpDiscoveryPort to set.
*/
- public void setUdpDiscoveryPort( int udpDiscoveryPort );
+ void setUdpDiscoveryPort( int udpDiscoveryPort );
/**
* The address to broadcast to if UDPDiscovery is enabled.
* <p>
* @return Returns the udpDiscoveryAddr.
*/
- public String getUdpDiscoveryAddr();
+ String getUdpDiscoveryAddr();
/**
* Sets the address to broadcast to if UDPDiscovery is enabled.
@@ -122,7 +122,7 @@ public interface ITCPLateralCacheAttribu
* @param udpDiscoveryAddr
* The udpDiscoveryAddr to set.
*/
- public void setUdpDiscoveryAddr( String udpDiscoveryAddr );
+ void setUdpDiscoveryAddr( String udpDiscoveryAddr );
/**
* Is the lateral allowed to try and get from other laterals.
@@ -131,28 +131,28 @@ public interface ITCPLateralCacheAttribu
* <p>
* @param allowGet
*/
- public void setAllowGet( boolean allowGet );
+ void setAllowGet( boolean allowGet );
/**
* Is the lateral allowed to try and get from other laterals.
* <p>
* @return true if the lateral will try to get
*/
- public boolean isAllowGet();
+ boolean isAllowGet();
/**
* Is the lateral allowed to put objects to other laterals.
* <p>
* @param allowPut
*/
- public void setAllowPut( boolean allowPut );
+ void setAllowPut( boolean allowPut );
/**
* Is the lateral allowed to put objects to other laterals.
* <p>
* @return true if puts are allowed
*/
- public boolean isAllowPut();
+ boolean isAllowPut();
/**
* Should the client send a remove command rather than a put when update is
@@ -161,7 +161,7 @@ public interface ITCPLateralCacheAttribu
* <p>
* @param issueRemoveOnPut
*/
- public void setIssueRemoveOnPut( boolean issueRemoveOnPut );
+ void setIssueRemoveOnPut( boolean issueRemoveOnPut );
/**
* Should the client send a remove command rather than a put when update is
@@ -170,11 +170,11 @@ public interface ITCPLateralCacheAttribu
* <p>
* @return true if updates will result in a remove command being sent.
*/
- public boolean isIssueRemoveOnPut();
+ boolean isIssueRemoveOnPut();
/**
* Should the receiver try to match hashcodes. If true, the receiver will
- * see if the client supplied a hshcode. If it did, then it will try to get
+ * see if the client supplied a hashcode. If it did, then it will try to get
* the item locally. If the item exists, then it will compare the hashcode.
* if they are the same, it will not remove. This isn't perfect since
* different objects can have the same hashcode, but it is unlikely of
@@ -182,11 +182,11 @@ public interface ITCPLateralCacheAttribu
* <p>
* @return boolean
*/
- public boolean isFilterRemoveByHashCode();
+ boolean isFilterRemoveByHashCode();
/**
* Should the receiver try to match hashcodes. If true, the receiver will
- * see if the client supplied a hshcode. If it did, then it will try to get
+ * see if the client supplied a hashcode. If it did, then it will try to get
* the item locally. If the item exists, then it will compare the hashcode.
* if they are the same, it will not remove. This isn't perfect since
* different objects can have the same hashcode, but it is unlikely of
@@ -194,25 +194,25 @@ public interface ITCPLateralCacheAttribu
* <p>
* @param filter
*/
- public void setFilterRemoveByHashCode( boolean filter );
+ void setFilterRemoveByHashCode( boolean filter );
/**
* @param socketTimeOut the socketTimeOut to set
*/
- public void setSocketTimeOut( int socketTimeOut );
+ void setSocketTimeOut( int socketTimeOut );
/**
* @return the socketTimeOut
*/
- public int getSocketTimeOut();
+ int getSocketTimeOut();
/**
* @param openTimeOut the openTimeOut to set
*/
- public void setOpenTimeOut( int openTimeOut );
+ void setOpenTimeOut( int openTimeOut );
/**
* @return the openTimeOut
*/
- public int getOpenTimeOut();
+ int getOpenTimeOut();
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/AbstractRemoteAuxiliaryCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/AbstractRemoteAuxiliaryCache.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/AbstractRemoteAuxiliaryCache.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/AbstractRemoteAuxiliaryCache.java Sat Mar 29 18:36:20 2014
@@ -566,10 +566,10 @@ public abstract class AbstractRemoteAuxi
se.setData( this.getRemoteCacheAttributes().getRemoteTypeName() + "" );
elems.add( se );
- if ( this.getRemoteCacheAttributes().getRemoteType() == RemoteType.CLUSTER )
- {
- // something cluster specific
- }
+// if ( this.getRemoteCacheAttributes().getRemoteType() == RemoteType.CLUSTER )
+// {
+// // something cluster specific
+// }
// no data gathered here
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/RemoteCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/RemoteCache.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/RemoteCache.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/RemoteCache.java Sat Mar 29 18:36:20 2014
@@ -92,10 +92,10 @@ public class RemoteCache<K extends Seria
se.setData( this.getRemoteCacheAttributes().getRemoteTypeName() + "" );
elems.add( se );
- if ( this.getRemoteCacheAttributes().getRemoteType() == RemoteType.CLUSTER )
- {
- // something cluster specific
- }
+// if ( this.getRemoteCacheAttributes().getRemoteType() == RemoteType.CLUSTER )
+// {
+// // something cluster specific
+// }
// get the stats from the super too
// get as array, convert to list, add list to our outer list
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/behavior/IRemoteCacheClient.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/behavior/IRemoteCacheClient.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/behavior/IRemoteCacheClient.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/behavior/IRemoteCacheClient.java Sat Mar 29 18:36:20 2014
@@ -41,7 +41,7 @@ public interface IRemoteCacheClient<K ex
* <p>
* @param remote ICacheServiceNonLocal -- the remote server or proxy to the remote server
*/
- public void fixCache( ICacheServiceNonLocal<?, ?> remote );
+ void fixCache( ICacheServiceNonLocal<?, ?> remote );
/**
* Gets the listenerId attribute of the RemoteCacheListener object.
@@ -51,7 +51,7 @@ public interface IRemoteCacheClient<K ex
* <p>
* @return The listenerId value
*/
- public long getListenerId();
+ long getListenerId();
/**
* This returns the listener associated with this remote cache. TODO we should try to get this
@@ -59,5 +59,5 @@ public interface IRemoteCacheClient<K ex
* <p>
* @return IRemoteCacheListener
*/
- public IRemoteCacheListener<K, V> getListener();
+ IRemoteCacheListener<K, V> getListener();
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/behavior/IRemoteCacheListener.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/behavior/IRemoteCacheListener.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/behavior/IRemoteCacheListener.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/behavior/IRemoteCacheListener.java Sat Mar 29 18:36:20 2014
@@ -32,19 +32,13 @@ import org.apache.commons.jcs.engine.beh
public interface IRemoteCacheListener<K extends Serializable, V extends Serializable>
extends ICacheListener<K, V>, Remote
{
- /** SERVER_LISTENER -- for the cluster */
- public final static int SERVER_LISTENER = 0;
-
- /** CLIENT_LISTENER -- these aren't used any longer. remove */
- public final static int CLIENT_LISTENER = 1;
-
/**
* Get the id to be used by this manager.
* <p>
* @return long
* @throws IOException
*/
- public long getListenerId()
+ long getListenerId()
throws IOException;
/**
@@ -54,7 +48,7 @@ public interface IRemoteCacheListener<K
* @param id
* @throws IOException
*/
- public void setListenerId( long id )
+ void setListenerId( long id )
throws IOException;
/**
@@ -63,7 +57,7 @@ public interface IRemoteCacheListener<K
* @return The remoteType value
* @throws IOException
*/
- public RemoteType getRemoteType()
+ RemoteType getRemoteType()
throws IOException;
/**
@@ -73,7 +67,7 @@ public interface IRemoteCacheListener<K
* @return the local host address.
* @throws IOException
*/
- public String getLocalHostAddress()
+ String getLocalHostAddress()
throws IOException;
/**
@@ -81,6 +75,6 @@ public interface IRemoteCacheListener<K
* <p>
* @throws IOException
*/
- public void dispose()
+ void dispose()
throws IOException;
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServer.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServer.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServer.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServer.java Sat Mar 29 18:36:20 2014
@@ -21,6 +21,7 @@ package org.apache.commons.jcs.auxiliary
import java.io.IOException;
import java.io.Serializable;
+import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.registry.Registry;
import java.rmi.server.RMISocketFactory;
@@ -35,7 +36,6 @@ import java.util.Set;
import org.apache.commons.jcs.access.exception.CacheException;
import org.apache.commons.jcs.auxiliary.remote.behavior.IRemoteCacheListener;
import org.apache.commons.jcs.auxiliary.remote.behavior.IRemoteCacheObserver;
-import org.apache.commons.jcs.auxiliary.remote.behavior.IRemoteCacheServiceAdmin;
import org.apache.commons.jcs.auxiliary.remote.server.behavior.IRemoteCacheServerAttributes;
import org.apache.commons.jcs.auxiliary.remote.server.behavior.RemoteType;
import org.apache.commons.jcs.engine.CacheEventQueueFactory;
@@ -43,6 +43,7 @@ import org.apache.commons.jcs.engine.Cac
import org.apache.commons.jcs.engine.behavior.ICacheElement;
import org.apache.commons.jcs.engine.behavior.ICacheEventQueue;
import org.apache.commons.jcs.engine.behavior.ICacheListener;
+import org.apache.commons.jcs.engine.behavior.ICacheServiceAdmin;
import org.apache.commons.jcs.engine.behavior.ICacheServiceNonLocal;
import org.apache.commons.jcs.engine.control.CompositeCache;
import org.apache.commons.jcs.engine.control.CompositeCacheManager;
@@ -69,7 +70,7 @@ import org.apache.commons.logging.LogFac
*/
public class RemoteCacheServer<K extends Serializable, V extends Serializable>
extends UnicastRemoteObject
- implements ICacheServiceNonLocal<K, V>, IRemoteCacheObserver, IRemoteCacheServiceAdmin, Unreferenced
+ implements ICacheServiceNonLocal<K, V>, IRemoteCacheObserver, ICacheServiceAdmin, Remote, Unreferenced
{
/** For serialization. Don't change. */
private static final long serialVersionUID = -8072345435941473116L;
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServerFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServerFactory.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServerFactory.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServerFactory.java Sat Mar 29 18:36:20 2014
@@ -37,7 +37,7 @@ import java.util.concurrent.TimeUnit;
import org.apache.commons.jcs.auxiliary.AuxiliaryCacheConfigurator;
import org.apache.commons.jcs.auxiliary.remote.RemoteUtils;
import org.apache.commons.jcs.auxiliary.remote.behavior.IRemoteCacheConstants;
-import org.apache.commons.jcs.auxiliary.remote.behavior.IRemoteCacheServiceAdmin;
+import org.apache.commons.jcs.engine.behavior.ICacheServiceAdmin;
import org.apache.commons.jcs.engine.logging.behavior.ICacheEventLogger;
import org.apache.commons.jcs.utils.config.OptionConverter;
import org.apache.commons.jcs.utils.config.PropertySetter;
@@ -473,7 +473,7 @@ public class RemoteCacheServerFactory
{
log.debug( "server found" );
}
- IRemoteCacheServiceAdmin admin = (IRemoteCacheServiceAdmin) obj;
+ ICacheServiceAdmin admin = (ICacheServiceAdmin) obj;
try
{
admin.shutdown();
@@ -501,7 +501,7 @@ public class RemoteCacheServerFactory
log.debug( "server found" );
log.debug( "obj = " + obj );
- IRemoteCacheServiceAdmin admin = (IRemoteCacheServiceAdmin) obj;
+ ICacheServiceAdmin admin = (ICacheServiceAdmin) obj;
try
{
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/CacheEventQueue.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/CacheEventQueue.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/CacheEventQueue.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/CacheEventQueue.java Sat Mar 29 18:36:20 2014
@@ -39,7 +39,7 @@ public class CacheEventQueue<K extends S
extends AbstractCacheEventQueue<K, V>
{
/** The type of queue -- there are pooled and single */
- private static final String queueType = SINGLE_QUEUE_TYPE;
+ private static final QueueType queueType = QueueType.SINGLE;
/** the thread that works the queue. */
private Thread processorThread;
@@ -118,7 +118,7 @@ public class CacheEventQueue<K extends S
* <p>
* @return queueType
*/
- public String getQueueType()
+ public QueueType getQueueType()
{
return queueType;
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/CacheEventQueueFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/CacheEventQueueFactory.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/CacheEventQueueFactory.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/CacheEventQueueFactory.java Sat Mar 29 18:36:20 2014
@@ -23,7 +23,6 @@ import java.io.Serializable;
import org.apache.commons.jcs.engine.behavior.ICacheEventQueue;
import org.apache.commons.jcs.engine.behavior.ICacheListener;
-import org.apache.commons.jcs.utils.config.OptionConverter;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -45,11 +44,11 @@ public class CacheEventQueueFactory<K ex
* @param listenerId
* @param cacheName
* @param threadPoolName
- * @param poolType - SINGLE, QUEUED, or classname
+ * @param poolType - SINGLE, POOLED
* @return ICacheEventQueue
*/
public ICacheEventQueue<K, V> createCacheEventQueue( ICacheListener<K, V> listener, long listenerId, String cacheName,
- String threadPoolName, String poolType )
+ String threadPoolName, ICacheEventQueue.QueueType poolType )
{
return createCacheEventQueue( listener, listenerId, cacheName, 10, 500, threadPoolName, poolType );
}
@@ -68,7 +67,7 @@ public class CacheEventQueueFactory<K ex
*/
public ICacheEventQueue<K, V> createCacheEventQueue( ICacheListener<K, V> listener, long listenerId, String cacheName,
int maxFailure, int waitBeforeRetry, String threadPoolName,
- String poolType )
+ ICacheEventQueue.QueueType poolType )
{
if ( log.isDebugEnabled() )
{
@@ -76,33 +75,16 @@ public class CacheEventQueueFactory<K ex
}
ICacheEventQueue<K, V> eventQueue = null;
- if ( poolType == null || ICacheEventQueue.SINGLE_QUEUE_TYPE.equalsIgnoreCase( poolType ) )
+ if ( poolType == null || ICacheEventQueue.QueueType.SINGLE == poolType )
{
eventQueue = new CacheEventQueue<K, V>( listener, listenerId, cacheName, maxFailure, waitBeforeRetry );
}
- else if ( ICacheEventQueue.POOLED_QUEUE_TYPE.equalsIgnoreCase( poolType ) )
+ else if ( ICacheEventQueue.QueueType.POOLED == poolType )
{
eventQueue = new PooledCacheEventQueue<K, V>( listener, listenerId, cacheName, maxFailure, waitBeforeRetry,
threadPoolName );
}
- else
- {
- eventQueue = OptionConverter.instantiateByClassName( poolType, null );
- if ( eventQueue != null )
- {
- if ( log.isInfoEnabled() )
- {
- log.info( "Created custom event queue. " + eventQueue );
- }
- eventQueue.initialize( listener, listenerId, cacheName, maxFailure, waitBeforeRetry, threadPoolName );
- }
- else
- {
- log.warn( "Could not instantiate custom event queue [" + poolType
- + "]. Will use standard single threaded queue." );
- eventQueue = new CacheEventQueue<K, V>( listener, listenerId, cacheName, maxFailure, waitBeforeRetry );
- }
- }
+
return eventQueue;
}
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/PooledCacheEventQueue.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/PooledCacheEventQueue.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/PooledCacheEventQueue.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/PooledCacheEventQueue.java Sat Mar 29 18:36:20 2014
@@ -45,7 +45,7 @@ public class PooledCacheEventQueue<K ext
extends AbstractCacheEventQueue<K, V>
{
/** The type of event queue */
- private static final String queueType = POOLED_QUEUE_TYPE;
+ private static final QueueType queueType = QueueType.POOLED;
/** The Thread Pool to execute events with. */
private ThreadPoolExecutor pool = null;
@@ -103,7 +103,7 @@ public class PooledCacheEventQueue<K ext
/**
* @return the queue type
*/
- public String getQueueType()
+ public QueueType getQueueType()
{
return queueType;
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheElement.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheElement.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheElement.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheElement.java Sat Mar 29 18:36:20 2014
@@ -41,28 +41,28 @@ public interface ICacheElement<K extends
*
* @return The cacheName value
*/
- public String getCacheName();
+ String getCacheName();
/**
* Gets the key attribute of the ICacheElement<K, V> object
*
* @return The key value
*/
- public K getKey();
+ K getKey();
/**
* Gets the val attribute of the ICacheElement<K, V> object
*
* @return The val value
*/
- public V getVal();
+ V getVal();
/**
* Gets the attributes attribute of the ICacheElement<K, V> object
*
* @return The attributes value
*/
- public IElementAttributes getElementAttributes();
+ IElementAttributes getElementAttributes();
/**
* Sets the attributes attribute of the ICacheElement<K, V> object
@@ -70,5 +70,5 @@ public interface ICacheElement<K extends
* @param attr
* The new attributes value
*/
- public void setElementAttributes( IElementAttributes attr );
+ void setElementAttributes( IElementAttributes attr );
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheElementSerialized.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheElementSerialized.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheElementSerialized.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheElementSerialized.java Sat Mar 29 18:36:20 2014
@@ -34,40 +34,10 @@ public interface ICacheElementSerialized
extends ICacheElement<K, V>
{
/**
- * Gets the cacheName attribute of the ICacheElement<K, V> object. The cacheName is also known as the
- * region name.
- *<p>
- * @return The cacheName value
- */
- public String getCacheName();
-
- /**
- * Gets the key attribute of the ICacheElementSerialized object. This is the standard key that
- * the value can be reference by.
- *<p>
- * @return The key value
- */
- public K getKey();
-
- /**
* Gets the value attribute of the ICacheElementSerialized object. This is the value the client
* cached serialized by some mechanism.
*<p>
* @return The serialized value
*/
- public byte[] getSerializedValue();
-
- /**
- * Gets the attributes attribute of the ICacheElement<K, V> object
- *<p>
- * @return The attributes value
- */
- public IElementAttributes getElementAttributes();
-
- /**
- * Sets the attributes attribute of the ICacheElement<K, V> object
- *<p>
- * @param attr The new attributes value
- */
- public void setElementAttributes( IElementAttributes attr );
+ byte[] getSerializedValue();
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheEventQueue.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheEventQueue.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheEventQueue.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheEventQueue.java Sat Mar 29 18:36:20 2014
@@ -30,6 +30,15 @@ import org.apache.commons.jcs.engine.sta
*/
public interface ICacheEventQueue<K extends Serializable, V extends Serializable>
{
+ enum QueueType
+ {
+ /** Does not use a thread pool. */
+ SINGLE,
+
+ /** Uses a thread pool. */
+ POOLED
+ }
+
/**
* Initializes the queue.
* <,p>
@@ -40,26 +49,15 @@ public interface ICacheEventQueue<K exte
* @param waitBeforeRetry
* @param threadPoolName
*/
- public void initialize( ICacheListener<K, V> listener, long listenerId, String cacheName, int maxFailure,
+ void initialize( ICacheListener<K, V> listener, long listenerId, String cacheName, int maxFailure,
int waitBeforeRetry, String threadPoolName );
/**
- * Does not use a thread pool.
- */
- public static final String SINGLE_QUEUE_TYPE = "SINGLE";
-
- /**
- * Uses a thread pool
- */
- public static final String POOLED_QUEUE_TYPE = "POOLED";
-
-
- /**
* Return the type of event queue we are using, either single or pooled.
* <p>
* @return the queue type: single or pooled
*/
- public abstract String getQueueType();
+ QueueType getQueueType();
/**
* Adds a feature to the PutEvent attribute of the ICacheEventQueue object
@@ -68,7 +66,7 @@ public interface ICacheEventQueue<K exte
* The feature to be added to the PutEvent attribute
* @throws IOException
*/
- public void addPutEvent( ICacheElement<K, V> ce )
+ void addPutEvent( ICacheElement<K, V> ce )
throws IOException;
/**
@@ -79,7 +77,7 @@ public interface ICacheEventQueue<K exte
* The feature to be added to the RemoveEvent attribute
* @throws IOException
*/
- public void addRemoveEvent( K key )
+ void addRemoveEvent( K key )
throws IOException;
/**
@@ -88,7 +86,7 @@ public interface ICacheEventQueue<K exte
* <p>
* @throws IOException
*/
- public void addRemoveAllEvent()
+ void addRemoveAllEvent()
throws IOException;
/**
@@ -97,7 +95,7 @@ public interface ICacheEventQueue<K exte
* <p>
* @throws IOException
*/
- public void addDisposeEvent()
+ void addDisposeEvent()
throws IOException;
/**
@@ -105,10 +103,10 @@ public interface ICacheEventQueue<K exte
*
* @return The listenerId value
*/
- public long getListenerId();
+ long getListenerId();
/** Description of the Method */
- public void destroy();
+ void destroy();
/**
* Gets the alive attribute of the ICacheEventQueue object. Alive just
@@ -117,14 +115,14 @@ public interface ICacheEventQueue<K exte
* <p>
* @return The alive value
*/
- public boolean isAlive();
+ boolean isAlive();
/**
* A Queue is working unless it has reached its max failure count.
* <p>
* @return boolean
*/
- public boolean isWorking();
+ boolean isWorking();
/**
* Returns the number of elements in the queue. If the queue cannot
@@ -132,19 +130,19 @@ public interface ICacheEventQueue<K exte
* <p>
* @return number of items in the queue.
*/
- public int size();
+ int size();
/**
* Are there elements in the queue.
* <p>
* @return true if there are stil elements.
*/
- public boolean isEmpty();
+ boolean isEmpty();
/**
* Returns the historical and statistical data for an event queue cache.
* <p>
* @return IStats
*/
- public IStats getStatistics();
+ IStats getStatistics();
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheListener.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheListener.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheListener.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheListener.java Sat Mar 29 18:36:20 2014
@@ -36,7 +36,7 @@ public interface ICacheListener<K extend
* @param item
* @throws IOException
*/
- public void handlePut( ICacheElement<K, V> item )
+ void handlePut( ICacheElement<K, V> item )
throws IOException;
/**
@@ -46,7 +46,7 @@ public interface ICacheListener<K extend
* @param key
* @throws IOException
*/
- public void handleRemove( String cacheName, K key )
+ void handleRemove( String cacheName, K key )
throws IOException;
/**
@@ -55,7 +55,7 @@ public interface ICacheListener<K extend
* @param cacheName
* @throws IOException
*/
- public void handleRemoveAll( String cacheName )
+ void handleRemoveAll( String cacheName )
throws IOException;
/**
@@ -64,7 +64,7 @@ public interface ICacheListener<K extend
* @param cacheName
* @throws IOException
*/
- public void handleDispose( String cacheName )
+ void handleDispose( String cacheName )
throws IOException;
/**
@@ -73,7 +73,7 @@ public interface ICacheListener<K extend
* @param id The new listenerId value
* @throws IOException
*/
- public void setListenerId( long id )
+ void setListenerId( long id )
throws IOException;
/**
@@ -82,6 +82,6 @@ public interface ICacheListener<K extend
* @return The listenerId value
* @throws IOException
*/
- public long getListenerId()
+ long getListenerId()
throws IOException;
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheManager.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheManager.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheManager.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheManager.java Sat Mar 29 18:36:20 2014
@@ -36,7 +36,7 @@ public interface ICacheManager
*
* @return The cache value
*/
- public <K extends Serializable, V extends Serializable> ICache<K, V> getCache( String cacheName );
+ <K extends Serializable, V extends Serializable> ICache<K, V> getCache( String cacheName );
}
// end interface
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheService.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheService.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheService.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheService.java Sat Mar 29 18:36:20 2014
@@ -89,7 +89,7 @@ public interface ICacheService<K extends
* @param key
* @throws IOException
*/
- public void remove( String cacheName, K key )
+ void remove( String cacheName, K key )
throws IOException;
/**
@@ -97,7 +97,7 @@ public interface ICacheService<K extends
* @param cacheName
* @throws IOException
*/
- public void removeAll( String cacheName )
+ void removeAll( String cacheName )
throws IOException;
/**
@@ -106,13 +106,13 @@ public interface ICacheService<K extends
* @param cacheName
* @throws IOException
*/
- public void dispose( String cacheName )
+ void dispose( String cacheName )
throws IOException;
/**
* Frees all caches.
* @throws IOException
*/
- public void release()
+ void release()
throws IOException;
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheServiceAdmin.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheServiceAdmin.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheServiceAdmin.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheServiceAdmin.java Sat Mar 29 18:36:20 2014
@@ -34,18 +34,18 @@ public interface ICacheServiceAdmin
* @return The stats value
* @throws IOException
*/
- public String getStats()
+ String getStats()
throws IOException;
/** Description of the Method
* @throws IOException*/
- public void shutdown()
+ void shutdown()
throws IOException;
/** Description of the Method
* @param host
* @param port
* @throws IOException*/
- public void shutdown( String host, int port )
+ void shutdown( String host, int port )
throws IOException;
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheType.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheType.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheType.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/ICacheType.java Sat Mar 29 18:36:20 2014
@@ -25,7 +25,7 @@ package org.apache.commons.jcs.engine.be
*/
public interface ICacheType
{
- public enum CacheType {
+ enum CacheType {
/** Composite/ memory cache type, central hub. */
CACHE_HUB,
@@ -44,6 +44,6 @@ public interface ICacheType
* <p>
* @return The cacheType value
*/
- public CacheType getCacheType();
+ CacheType getCacheType();
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/IShutdownObservable.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/IShutdownObservable.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/IShutdownObservable.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/behavior/IShutdownObservable.java Sat Mar 29 18:36:20 2014
@@ -43,13 +43,13 @@ public interface IShutdownObservable
* Registers an observer with the observable object.
* @param observer
*/
- abstract void registerShutdownObserver( IShutdownObserver observer );
+ void registerShutdownObserver( IShutdownObserver observer );
/**
* Deregisters the observer with the observable.
*
* @param observer
*/
- abstract void deregisterShutdownObserver( IShutdownObserver observer );
+ void deregisterShutdownObserver( IShutdownObserver observer );
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/control/event/behavior/IElementEvent.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/control/event/behavior/IElementEvent.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/control/event/behavior/IElementEvent.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/control/event/behavior/IElementEvent.java Sat Mar 29 18:36:20 2014
@@ -33,10 +33,10 @@ public interface IElementEvent
*<p>
* @return The elementEvent value
*/
- public ElementEventType getElementEvent();
+ ElementEventType getElementEvent();
/**
* @return the source of the event.
*/
- public Object getSource();
+ Object getSource();
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/control/event/behavior/IElementEventHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/control/event/behavior/IElementEventHandler.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/control/event/behavior/IElementEventHandler.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/control/event/behavior/IElementEventHandler.java Sat Mar 29 18:36:20 2014
@@ -36,5 +36,5 @@ public interface IElementEventHandler
* @param event
* The event created by the cache.
*/
- public void handleElementEvent( IElementEvent event );
+ void handleElementEvent( IElementEvent event );
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/control/event/behavior/IElementEventQueue.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/control/event/behavior/IElementEventQueue.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/control/event/behavior/IElementEventQueue.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/control/event/behavior/IElementEventQueue.java Sat Mar 29 18:36:20 2014
@@ -39,17 +39,17 @@ public interface IElementEventQueue exte
* The IElementEventHandler IElementEvent event
* @throws IOException
*/
- public void addElementEvent( IElementEventHandler hand, IElementEvent event )
+ void addElementEvent( IElementEventHandler hand, IElementEvent event )
throws IOException;
/** Description of the Method */
- public void destroy();
+ void destroy();
/**
* Gets the alive attribute of the IElementEventQueue object
*
* @return The alive value
*/
- public boolean isAlive();
+ boolean isAlive();
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/logging/behavior/ICacheEvent.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/logging/behavior/ICacheEvent.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/logging/behavior/ICacheEvent.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/logging/behavior/ICacheEvent.java Sat Mar 29 18:36:20 2014
@@ -28,50 +28,50 @@ public interface ICacheEvent<K extends S
/**
* @param source the source to set
*/
- public void setSource( String source );
+ void setSource( String source );
/**
* @return the source
*/
- public String getSource();
+ String getSource();
/**
* @param region the region to set
*/
- public void setRegion( String region );
+ void setRegion( String region );
/**
* @return the region
*/
- public String getRegion();
+ String getRegion();
/**
* @param eventName the eventName to set
*/
- public void setEventName( String eventName );
+ void setEventName( String eventName );
/**
* @return the eventName
*/
- public String getEventName();
+ String getEventName();
/**
* @param optionalDetails the optionalDetails to set
*/
- public void setOptionalDetails( String optionalDetails );
+ void setOptionalDetails( String optionalDetails );
/**
* @return the optionalDetails
*/
- public String getOptionalDetails();
+ String getOptionalDetails();
/**
* @param key the key to set
*/
- public void setKey( K key );
+ void setKey( K key );
/**
* @return the key
*/
- public K getKey();
+ K getKey();
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/logging/behavior/ICacheEventLogger.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/logging/behavior/ICacheEventLogger.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/logging/behavior/ICacheEventLogger.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/logging/behavior/ICacheEventLogger.java Sat Mar 29 18:36:20 2014
@@ -31,28 +31,28 @@ import java.io.Serializable;
public interface ICacheEventLogger
{
/** ICache update */
- static final String UPDATE_EVENT = "update";
+ String UPDATE_EVENT = "update";
/** ICache get */
- static final String GET_EVENT = "get";
+ String GET_EVENT = "get";
/** ICache getMultiple */
- static final String GETMULTIPLE_EVENT = "getMultiple";
+ String GETMULTIPLE_EVENT = "getMultiple";
/** ICache getMatching */
- static final String GETMATCHING_EVENT = "getMatching";
+ String GETMATCHING_EVENT = "getMatching";
/** ICache remove */
- static final String REMOVE_EVENT = "remove";
+ String REMOVE_EVENT = "remove";
/** ICache removeAll */
- static final String REMOVEALL_EVENT = "removeAll";
+ String REMOVEALL_EVENT = "removeAll";
/** ICache dispose */
- static final String DISPOSE_EVENT = "dispose";
+ String DISPOSE_EVENT = "dispose";
/** ICache enqueue. The time in the queue. */
- //static final String ENQUEUE_EVENT = "enqueue";
+ //String ENQUEUE_EVENT = "enqueue";
/**
* Creates an event.
* <p>
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/stats/behavior/ICacheStats.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/stats/behavior/ICacheStats.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/stats/behavior/ICacheStats.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/stats/behavior/ICacheStats.java Sat Mar 29 18:36:20 2014
@@ -30,20 +30,20 @@ public interface ICacheStats
* <p>
* @return The region name
*/
- public abstract String getRegionName();
+ String getRegionName();
/**
* @param name
*/
- public abstract void setRegionName( String name );
+ void setRegionName( String name );
/**
* @return IStats[]
*/
- public abstract IStats[] getAuxiliaryCacheStats();
+ IStats[] getAuxiliaryCacheStats();
/**
* @param stats
*/
- public abstract void setAuxiliaryCacheStats( IStats[] stats );
+ void setAuxiliaryCacheStats( IStats[] stats );
}
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/stats/behavior/IStatElement.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/stats/behavior/IStatElement.java?rev=1583038&r1=1583037&r2=1583038&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/stats/behavior/IStatElement.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/stats/behavior/IStatElement.java Sat Mar 29 18:36:20 2014
@@ -29,24 +29,24 @@ public interface IStatElement
* <p>
* @return the stat element name
*/
- public abstract String getName();
+ String getName();
/**
* @param name
*/
- public abstract void setName( String name );
+ void setName( String name );
/**
* Get the data, ex. for hit count you would get a String value for some number.
* <p>
* @return String data
*/
- public abstract String getData();
+ String getData();
/**
* Set the data for this element.
* <p>
* @param data
*/
- public abstract void setData( String data );
+ void setData( String data );
}