As requested, here is a -tightly focused- patch for changing the listenerId
to a long (and surrounding comments), and nothing else.
Hope this helps.
-Travis Savo
Index: org/apache/jcs/auxiliary/disk/AbstractDiskCache.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/disk/A
bstractDiskCache.java,v
retrieving revision 1.20
diff -u -r1.20 AbstractDiskCache.java
--- org/apache/jcs/auxiliary/disk/AbstractDiskCache.java 15 Apr 2004
19:22:52 -0000 1.20
+++ org/apache/jcs/auxiliary/disk/AbstractDiskCache.java 13 May 2004
21:34:20 -0000
@@ -354,12 +354,12 @@
*/
private class MyCacheListener implements ICacheListener
{
- private byte listenerId = 0;
+ private long listenerId = 0;
/**
* @see ICacheListener#getListenerId
*/
- public byte getListenerId()
+ public long getListenerId()
throws IOException
{
return this.listenerId;
@@ -368,7 +368,7 @@
/**
* @see ICacheListener#setListenerId
*/
- public void setListenerId( byte id )
+ public void setListenerId( long id )
throws IOException
{
this.listenerId = id;
Index: org/apache/jcs/auxiliary/disk/hsql/behavior/IHSQLCacheService.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/disk/h
sql/behavior/IHSQLCacheService.java,v
retrieving revision 1.3
diff -u -r1.3 IHSQLCacheService.java
--- org/apache/jcs/auxiliary/disk/hsql/behavior/IHSQLCacheService.java 15
Apr 2004 19:22:58 -0000 1.3
+++ org/apache/jcs/auxiliary/disk/hsql/behavior/IHSQLCacheService.java 13
May 2004 21:34:20 -0000
@@ -32,17 +32,17 @@
{
/** Puts a cache item to the cache. */
- public void update( ICacheElement item, byte requesterId )
+ public void update( ICacheElement item, long requesterId )
throws IOException;
/** Removes the given key from the specified cache. */
- public void remove( String cacheName, Serializable key, byte
requesterId )
+ public void remove( String cacheName, Serializable key, long
requesterId )
throws IOException;
/** Remove all keys from the sepcified cache. */
- public void removeAll( String cacheName, byte requesterId )
+ public void removeAll( String cacheName, long requesterId )
throws IOException;
}
Index: org/apache/jcs/auxiliary/disk/jisp/behavior/IJISPCacheService.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/disk/j
isp/behavior/IJISPCacheService.java,v
retrieving revision 1.3
diff -u -r1.3 IJISPCacheService.java
--- org/apache/jcs/auxiliary/disk/jisp/behavior/IJISPCacheService.java 15
Apr 2004 19:22:58 -0000 1.3
+++ org/apache/jcs/auxiliary/disk/jisp/behavior/IJISPCacheService.java 13
May 2004 21:34:20 -0000
@@ -32,17 +32,17 @@
{
/** Puts a cache item to the cache. */
- public void update( ICacheElement item, byte requesterId )
+ public void update( ICacheElement item, long requesterId )
throws IOException;
/** Removes the given key from the specified cache. */
- public void remove( String cacheName, Serializable key, byte
requesterId )
+ public void remove( String cacheName, Serializable key, long
requesterId )
throws IOException;
/** Remove all keys from the sepcified cache. */
- public void removeAll( String cacheName, byte requesterId )
+ public void removeAll( String cacheName, long requesterId )
throws IOException;
}
Index: org/apache/jcs/auxiliary/lateral/LateralCacheInfo.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/latera
l/LateralCacheInfo.java,v
retrieving revision 1.3
diff -u -r1.3 LateralCacheInfo.java
--- org/apache/jcs/auxiliary/lateral/LateralCacheInfo.java 15 Apr 2004
19:22:48 -0000 1.3
+++ org/apache/jcs/auxiliary/lateral/LateralCacheInfo.java 13 May 2004
21:34:20 -0000
@@ -40,6 +40,6 @@
*/
protected static VMID vmid = new VMID();
/** Description of the Field */
- public static byte listenerId = ( byte ) vmid.hashCode();
+ public static long listenerId = vmid.hashCode();
}
Index: org/apache/jcs/auxiliary/lateral/LateralElementDescriptor.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/latera
l/LateralElementDescriptor.java,v
retrieving revision 1.3
diff -u -r1.3 LateralElementDescriptor.java
--- org/apache/jcs/auxiliary/lateral/LateralElementDescriptor.java 15
Apr 2004 19:22:48 -0000 1.3
+++ org/apache/jcs/auxiliary/lateral/LateralElementDescriptor.java 13
May 2004 21:34:20 -0000
@@ -45,7 +45,7 @@
/** Description of the Field */
public ICacheElement ce;
/** Description of the Field */
- public byte requesterId;
+ public long requesterId;
/** Description of the Field */
public int command = UPDATE;
Index: org/apache/jcs/auxiliary/lateral/ZombieLateralCacheService.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/latera
l/ZombieLateralCacheService.java,v
retrieving revision 1.4
diff -u -r1.4 ZombieLateralCacheService.java
--- org/apache/jcs/auxiliary/lateral/ZombieLateralCacheService.java 15
Apr 2004 19:22:48 -0000 1.4
+++ org/apache/jcs/auxiliary/lateral/ZombieLateralCacheService.java 13
May 2004 21:34:20 -0000
@@ -36,15 +36,15 @@
{
/** Description of the Method */
- public void update( ICacheElement item, byte listenerId ) { }
+ public void update( ICacheElement item, long listenerId ) { }
/** Description of the Method */
- public void remove( String cacheName, Serializable key, byte listenerId
) { }
+ public void remove( String cacheName, Serializable key, long listenerId
) { }
/** Description of the Method */
- public void removeAll( String cacheName, byte listenerId ) { }
+ public void removeAll( String cacheName, long listenerId ) { }
public Set getGroupKeys(String cacheName, String groupName)
{
Index: org/apache/jcs/auxiliary/lateral/behavior/ILateralCacheService.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/latera
l/behavior/ILateralCacheService.java,v
retrieving revision 1.4
diff -u -r1.4 ILateralCacheService.java
--- org/apache/jcs/auxiliary/lateral/behavior/ILateralCacheService.java 15
Apr 2004 19:22:58 -0000 1.4
+++ org/apache/jcs/auxiliary/lateral/behavior/ILateralCacheService.java 13
May 2004 21:34:20 -0000
@@ -33,17 +33,17 @@
{
/** Puts a cache item to the cache. */
- public void update( ICacheElement item, byte requesterId )
+ public void update( ICacheElement item, long requesterId )
throws IOException;
/** Removes the given key from the specified cache. */
- public void remove( String cacheName, Serializable key, byte
requesterId )
+ public void remove( String cacheName, Serializable key, long
requesterId )
throws IOException;
/** Remove all keys from the sepcified cache. */
- public void removeAll( String cacheName, byte requesterId )
+ public void removeAll( String cacheName, long requesterId )
throws IOException;
public Set getGroupKeys(String cacheName, String groupName);
Index:
org/apache/jcs/auxiliary/lateral/javagroups/LateralCacheJGListener.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/latera
l/javagroups/LateralCacheJGListener.java,v
retrieving revision 1.6
diff -u -r1.6 LateralCacheJGListener.java
--- org/apache/jcs/auxiliary/lateral/javagroups/LateralCacheJGListener.java
11 May 2004 01:04:36 -0000 1.6
+++ org/apache/jcs/auxiliary/lateral/javagroups/LateralCacheJGListener.java
13 May 2004 21:34:20 -0000
@@ -106,7 +106,7 @@
* @param id The new listenerId value
* @exception IOException
*/
- public void setListenerId( byte id )
+ public void setListenerId( long id )
throws IOException
{
LateralCacheInfo.listenerId = id;
@@ -123,7 +123,7 @@
* @return The listenerId value
* @exception IOException
*/
- public byte getListenerId()
+ public long getListenerId()
throws IOException
{
Index: org/apache/jcs/auxiliary/lateral/javagroups/LateralJGSender.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/latera
l/javagroups/LateralJGSender.java,v
retrieving revision 1.4
diff -u -r1.4 LateralJGSender.java
--- org/apache/jcs/auxiliary/lateral/javagroups/LateralJGSender.java 11
May 2004 01:04:36 -0000 1.4
+++ org/apache/jcs/auxiliary/lateral/javagroups/LateralJGSender.java 13
May 2004 21:34:20 -0000
@@ -300,7 +300,7 @@
* @param requesterId
* @exception IOException
*/
- public void update( ICacheElement item, byte requesterId )
+ public void update( ICacheElement item, long requesterId )
throws IOException
{
LateralElementDescriptor led = new LateralElementDescriptor( item
);
@@ -332,7 +332,7 @@
* @param requesterId
* @exception IOException
*/
- public void remove( String cacheName, Serializable key, byte
requesterId )
+ public void remove( String cacheName, Serializable key, long
requesterId )
throws IOException
{
CacheElement ce = new CacheElement( cacheName, key, null );
@@ -393,7 +393,7 @@
* @param requesterId
* @exception IOException
*/
- public void removeAll( String cacheName, byte requesterId )
+ public void removeAll( String cacheName, long requesterId )
throws IOException
{
CacheElement ce = new CacheElement( cacheName, "ALL", null );
Index: org/apache/jcs/auxiliary/lateral/javagroups/LateralJGService.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/latera
l/javagroups/LateralJGService.java,v
retrieving revision 1.4
diff -u -r1.4 LateralJGService.java
--- org/apache/jcs/auxiliary/lateral/javagroups/LateralJGService.java 11
May 2004 01:04:35 -0000 1.4
+++ org/apache/jcs/auxiliary/lateral/javagroups/LateralJGService.java 13
May 2004 21:34:20 -0000
@@ -101,7 +101,7 @@
* @param requesterId
* @exception IOException
*/
- public void update( ICacheElement item, byte requesterId )
+ public void update( ICacheElement item, long requesterId )
throws IOException
{
LateralElementDescriptor led = new LateralElementDescriptor( item
);
@@ -127,7 +127,7 @@
* @param requesterId
* @exception IOException
*/
- public void remove( String cacheName, Serializable key, byte
requesterId )
+ public void remove( String cacheName, Serializable key, long
requesterId )
throws IOException
{
CacheElement ce = new CacheElement( cacheName, key, null );
@@ -192,7 +192,7 @@
* @param requesterId
* @exception IOException
*/
- public void removeAll( String cacheName, byte requesterId )
+ public void removeAll( String cacheName, long requesterId )
throws IOException
{
CacheElement ce = new CacheElement( cacheName, "ALL", null );
Index: org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPListener.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/latera
l/socket/tcp/LateralTCPListener.java,v
retrieving revision 1.6
diff -u -r1.6 LateralTCPListener.java
--- org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPListener.java 15
Apr 2004 19:22:56 -0000 1.6
+++ org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPListener.java 13
May 2004 21:34:20 -0000
@@ -138,7 +138,7 @@
*
* @param id The new listenerId value
*/
- public void setListenerId( byte id )
+ public void setListenerId( long id )
throws IOException
{
LateralCacheInfo.listenerId = id;
@@ -153,7 +153,7 @@
*
* @return The listenerId value
*/
- public byte getListenerId()
+ public long getListenerId()
throws IOException
{
return LateralCacheInfo.listenerId;
Index: org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPSender.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/latera
l/socket/tcp/LateralTCPSender.java,v
retrieving revision 1.9
diff -u -r1.9 LateralTCPSender.java
--- org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPSender.java 27
Apr 2004 21:08:24 -0000 1.9
+++ org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPSender.java 13
May 2004 21:34:20 -0000
@@ -312,7 +312,7 @@
// Service Methods //
/** Description of the Method */
- public void update( ICacheElement item, byte requesterId )
+ public void update( ICacheElement item, long requesterId )
throws IOException
{
LateralElementDescriptor led = new LateralElementDescriptor( item
);
@@ -331,7 +331,7 @@
/** Description of the Method */
- public void remove( String cacheName, Serializable key, byte
requesterId )
+ public void remove( String cacheName, Serializable key, long
requesterId )
throws IOException
{
CacheElement ce = new CacheElement( cacheName, key, null );
@@ -373,7 +373,7 @@
/** Description of the Method */
- public void removeAll( String cacheName, byte requesterId )
+ public void removeAll( String cacheName, long requesterId )
throws IOException
{
CacheElement ce = new CacheElement( cacheName, "ALL", null );
Index: org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPService.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/latera
l/socket/tcp/LateralTCPService.java,v
retrieving revision 1.6
diff -u -r1.6 LateralTCPService.java
--- org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPService.java 15
Apr 2004 19:22:56 -0000 1.6
+++ org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPService.java 13
May 2004 21:34:20 -0000
@@ -94,7 +94,7 @@
}
/** */
- public void update( ICacheElement item, byte requesterId )
+ public void update( ICacheElement item, long requesterId )
throws IOException
{
LateralElementDescriptor led = new LateralElementDescriptor( item
);
@@ -111,7 +111,7 @@
}
/** */
- public void remove( String cacheName, Serializable key, byte
requesterId )
+ public void remove( String cacheName, Serializable key, long
requesterId )
throws IOException
{
CacheElement ce = new CacheElement( cacheName, key, null );
@@ -179,7 +179,7 @@
}
/** */
- public void removeAll( String cacheName, byte requesterId )
+ public void removeAll( String cacheName, long requesterId )
throws IOException
{
CacheElement ce = new CacheElement( cacheName, "ALL", null );
Index: org/apache/jcs/auxiliary/remote/RemoteCacheInfo.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote
/RemoteCacheInfo.java,v
retrieving revision 1.3
diff -u -r1.3 RemoteCacheInfo.java
--- org/apache/jcs/auxiliary/remote/RemoteCacheInfo.java 15 Apr 2004
19:22:47 -0000 1.3
+++ org/apache/jcs/auxiliary/remote/RemoteCacheInfo.java 13 May 2004
21:34:20 -0000
@@ -39,7 +39,7 @@
* Need since there is no way to identify a client other than by host
in
* rmi.
*/
- protected static byte listenerId = 0;
+ protected static long listenerId = 0;
}
Index: org/apache/jcs/auxiliary/remote/RemoteCacheListener.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote
/RemoteCacheListener.java,v
retrieving revision 1.9
diff -u -r1.9 RemoteCacheListener.java
--- org/apache/jcs/auxiliary/remote/RemoteCacheListener.java 15 Apr 2004
19:22:47 -0000 1.9
+++ org/apache/jcs/auxiliary/remote/RemoteCacheListener.java 13 May 2004
21:34:21 -0000
@@ -112,7 +112,7 @@
*
* @param id The new listenerId value
*/
- public void setListenerId( byte id )
+ public void setListenerId( long id )
throws IOException
{
RemoteCacheInfo.listenerId = id;
@@ -128,7 +128,7 @@
*
* @return The listenerId value
*/
- public byte getListenerId()
+ public long getListenerId()
throws IOException
{
Index: org/apache/jcs/auxiliary/remote/ZombieRemoteCacheService.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote
/ZombieRemoteCacheService.java,v
retrieving revision 1.3
diff -u -r1.3 ZombieRemoteCacheService.java
--- org/apache/jcs/auxiliary/remote/ZombieRemoteCacheService.java 15
Apr 2004 19:22:47 -0000 1.3
+++ org/apache/jcs/auxiliary/remote/ZombieRemoteCacheService.java 13
May 2004 21:34:21 -0000
@@ -34,15 +34,15 @@
{
/** Description of the Method */
- public void update( ICacheElement item, byte listenerId ) { }
+ public void update( ICacheElement item, long listenerId ) { }
/** Description of the Method */
- public void remove( String cacheName, Serializable key, byte listenerId
) { }
+ public void remove( String cacheName, Serializable key, long listenerId
) { }
/** Description of the Method */
- public void removeAll( String cacheName, byte listenerId ) { }
+ public void removeAll( String cacheName, long listenerId ) { }
public Set getGroupKeys(String cacheName, String groupName)
{
Index: org/apache/jcs/auxiliary/remote/behavior/IRemoteCacheService.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote
/behavior/IRemoteCacheService.java,v
retrieving revision 1.8
diff -u -r1.8 IRemoteCacheService.java
--- org/apache/jcs/auxiliary/remote/behavior/IRemoteCacheService.java 15
Apr 2004 19:22:56 -0000 1.8
+++ org/apache/jcs/auxiliary/remote/behavior/IRemoteCacheService.java 13
May 2004 21:34:21 -0000
@@ -37,17 +37,17 @@
{
/** Puts a cache item to the cache. */
- public void update( ICacheElement item, byte requesterId )
+ public void update( ICacheElement item, long requesterId )
throws ObjectExistsException, IOException;
/** Removes the given key from the specified cache. */
- public void remove( String cacheName, Serializable key, byte
requesterId )
+ public void remove( String cacheName, Serializable key, long
requesterId )
throws IOException;
/** Remove all keys from the sepcified cache. */
- public void removeAll( String cacheName, byte requesterId )
+ public void removeAll( String cacheName, long requesterId )
throws IOException;
public Set getGroupKeys(String cacheName, String groupName)
Index: org/apache/jcs/auxiliary/remote/server/RemoteCacheServer.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote
/server/RemoteCacheServer.java,v
retrieving revision 1.14
diff -u -r1.14 RemoteCacheServer.java
--- org/apache/jcs/auxiliary/remote/server/RemoteCacheServer.java 15
Apr 2004 19:22:51 -0000 1.14
+++ org/apache/jcs/auxiliary/remote/server/RemoteCacheServer.java 13
May 2004 21:34:21 -0000
@@ -86,7 +86,7 @@
private final Hashtable idTypeMap = new Hashtable();
//private transient int listenerId = 0;
- private int[] listenerId = new int[1];
+ private long[] listenerId = new long[1];
/** Description of the Field */
protected IRemoteCacheServerAttributes rcsa;
@@ -229,12 +229,12 @@
public void update( ICacheElement item )
throws IOException
{
- update( item, ( byte ) 0 );
+ update( item, 0 );
}
/** Description of the Method */
- public void update( ICacheElement item, byte requesterId )
+ public void update( ICacheElement item, long requesterId )
throws IOException
{
@@ -263,7 +263,7 @@
CacheListeners cacheDesc = getCacheListeners(
item.getCacheName() );
Object val = item.getVal();
- Integer remoteTypeL = ( Integer ) idTypeMap.get( new Byte(
requesterId ) );
+ Integer remoteTypeL = ( Integer ) idTypeMap.get( new Long(
requesterId ) );
boolean fromCluster = false;
if ( remoteTypeL.intValue() == IRemoteCacheAttributes.CLUSTER )
{
@@ -353,7 +353,7 @@
*
* @return The eventQList value
*/
- private ICacheEventQueue[] getEventQList( CacheListeners
cacheListeners, byte requesterId )
+ private ICacheEventQueue[] getEventQList( CacheListeners
cacheListeners, long requesterId )
{
ICacheEventQueue[] list = null;
synchronized ( cacheListeners.eventQMap )
@@ -464,12 +464,12 @@
public void remove( String cacheName, Serializable key )
throws IOException
{
- remove( cacheName, key, ( byte ) 0 );
+ remove( cacheName, key, ( long ) 0 );
}
/** Description of the Method */
- public void remove( String cacheName, Serializable key, byte
requesterId )
+ public void remove( String cacheName, Serializable key, long
requesterId )
throws IOException
{
if ( log.isDebugEnabled() )
@@ -478,7 +478,7 @@
}
CacheListeners cacheDesc = ( CacheListeners )
cacheListenersMap.get( cacheName );
- Integer remoteTypeL = ( Integer ) idTypeMap.get( new Byte(
requesterId ) );
+ Integer remoteTypeL = ( Integer ) idTypeMap.get( new Long(
requesterId ) );
boolean fromCluster = false;
if ( remoteTypeL.intValue() == IRemoteCacheAttributes.CLUSTER )
{
@@ -541,12 +541,12 @@
public void removeAll( String cacheName )
throws IOException
{
- removeAll( cacheName, ( byte ) 0 );
+ removeAll( cacheName, 0 );
}
/** Description of the Method */
- public void removeAll( String cacheName, byte requesterId )
+ public void removeAll( String cacheName, long requesterId )
throws IOException
{
CacheListeners cacheDesc = ( CacheListeners )
cacheListenersMap.get( cacheName );
@@ -573,12 +573,12 @@
public void dispose( String cacheName )
throws IOException
{
- dispose( cacheName, ( byte ) 0 );
+ dispose( cacheName, 0 );
}
/** Description of the Method */
- public void dispose( String cacheName, byte requesterId )
+ public void dispose( String cacheName, long requesterId )
throws IOException
{
CacheListeners cacheDesc = ( CacheListeners )
cacheListenersMap.get( cacheName );
@@ -610,7 +610,7 @@
for ( Enumeration en = cacheListenersMap.elements();
en.hasMoreElements(); )
{
CacheListeners cacheDesc = ( CacheListeners )
en.nextElement();
- ICacheEventQueue[] qlist = getEventQList( cacheDesc, ( byte
) 0 );
+ ICacheEventQueue[] qlist = getEventQList( cacheDesc, 0 );
for ( int i = 0; i < qlist.length; i++ )
{
@@ -700,14 +700,14 @@
synchronized ( ICacheListener.class )
{
- byte id = 0;
+ long id = 0;
try
{
id = listener.getListenerId();
if ( id == 0 )
{
// must start at one so the next gets recognized
- byte listenerIdB = nextListenerId();
+ long listenerIdB = nextListenerId();
if ( log.isDebugEnabled() )
{
log.debug( "listener id=" + ( listenerIdB &
0xff ) + " addded for cache " + cacheName );
@@ -718,7 +718,7 @@
p1( "added new vm listener " + listenerIdB );
// relate the type to an id
- this.idTypeMap.put( new Byte( listenerIdB ), new
Integer( remoteType ) );
+ this.idTypeMap.put( new Long( listenerIdB ), new
Integer( remoteType ) );
}
else
@@ -847,17 +847,17 @@
}
/** Returns the next generated listener id [0,255]. */
- private byte nextListenerId()
+ private long nextListenerId()
{
- int id = 0;
- if ( listenerId[0] == 255 )
+ long id = 0;
+ if ( listenerId[0] == Long.MAX_VALUE )
{
synchronized ( listenerId )
{
id = listenerId[0];
listenerId[0] = 0;
// TODO: record & check if the generated id is currently
being
- // used by a valid listener. Currently if the id wraps
after 255,
+ // used by a valid listener. Currently if the id wraps
after Long.MAX_VALUE,
// we just assume it won't collide with an existing
listener who is live.
}
}
@@ -868,7 +868,7 @@
id = ++listenerId[0];
}
}
- return ( byte ) ( id & 0xff );
+ return id;
}
/**
Index: org/apache/jcs/auxiliary/remote/server/RemoteCacheServerInfo.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote
/server/RemoteCacheServerInfo.java,v
retrieving revision 1.3
diff -u -r1.3 RemoteCacheServerInfo.java
--- org/apache/jcs/auxiliary/remote/server/RemoteCacheServerInfo.java 15
Apr 2004 19:22:51 -0000 1.3
+++ org/apache/jcs/auxiliary/remote/server/RemoteCacheServerInfo.java 13
May 2004 21:34:21 -0000
@@ -40,6 +40,6 @@
*/
protected static VMID vmid = new VMID();
/** Description of the Field */
- public static byte listenerId = ( byte ) vmid.hashCode();
+ public static long listenerId = vmid.hashCode();
}
Index: org/apache/jcs/auxiliary/remote/server/RemoteCacheServerListener.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote
/server/RemoteCacheServerListener.java,v
retrieving revision 1.9
diff -u -r1.9 RemoteCacheServerListener.java
--- org/apache/jcs/auxiliary/remote/server/RemoteCacheServerListener.java
15 Apr 2004 19:22:51 -0000 1.9
+++ org/apache/jcs/auxiliary/remote/server/RemoteCacheServerListener.java
13 May 2004 21:34:22 -0000
@@ -110,7 +110,7 @@
*
* @param id The new listenerId value
*/
- public void setListenerId( byte id )
+ public void setListenerId( long id )
throws IOException
{
RemoteCacheServerInfo.listenerId = id;
@@ -126,7 +126,7 @@
*
* @return The listenerId value
*/
- public byte getListenerId()
+ public long getListenerId()
throws IOException
{
Index: org/apache/jcs/engine/CacheAdaptor.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/engine/CacheAdap
tor.java,v
retrieving revision 1.3
diff -u -r1.3 CacheAdaptor.java
--- org/apache/jcs/engine/CacheAdaptor.java 15 Apr 2004 19:22:49 -0000
1.3
+++ org/apache/jcs/engine/CacheAdaptor.java 13 May 2004 21:34:22 -0000
@@ -39,7 +39,7 @@
private final ICache cache;
/** Description of the Field */
- protected byte listenerId = 0;
+ protected long listenerId = 0;
/**
@@ -47,7 +47,7 @@
*
* @param id The new listenerId value
*/
- public void setListenerId( byte id )
+ public void setListenerId( long id )
throws IOException
{
this.listenerId = id;
@@ -60,7 +60,7 @@
*
* @return The listenerId value
*/
- public byte getListenerId()
+ public long getListenerId()
throws IOException
{
return this.listenerId;
Index: org/apache/jcs/engine/CacheEventQueue.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/engine/CacheEven
tQueue.java,v
retrieving revision 1.7
diff -u -r1.7 CacheEventQueue.java
--- org/apache/jcs/engine/CacheEventQueue.java 17 Apr 2004 14:00:11 -0000
1.7
+++ org/apache/jcs/engine/CacheEventQueue.java 13 May 2004 21:34:22 -0000
@@ -51,7 +51,7 @@
// private LinkedQueue queue = new LinkedQueue();
private ICacheListener listener;
- private byte listenerId;
+ private long listenerId;
private String cacheName;
private int failureCount;
@@ -80,7 +80,7 @@
* @param cacheName
*/
public CacheEventQueue( ICacheListener listener,
- byte listenerId,
+ long listenerId,
String cacheName )
{
this( listener, listenerId, cacheName, 10, 500 );
@@ -96,7 +96,7 @@
* @param waitBeforeRetry
*/
public CacheEventQueue( ICacheListener listener,
- byte listenerId,
+ long listenerId,
String cacheName,
int maxFailure,
int waitBeforeRetry )
@@ -163,7 +163,7 @@
/**
* @return The {3} value
*/
- public byte getListenerId()
+ public long getListenerId()
{
return this.listenerId;
}
Index: org/apache/jcs/engine/CacheInfo.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/engine/CacheInfo
.java,v
retrieving revision 1.3
diff -u -r1.3 CacheInfo.java
--- org/apache/jcs/engine/CacheInfo.java 15 Apr 2004 19:22:49 -0000
1.3
+++ org/apache/jcs/engine/CacheInfo.java 13 May 2004 21:34:22 -0000
@@ -41,6 +41,6 @@
*/
protected static VMID vmid = new VMID();
/** Description of the Field */
- public static byte listenerId = ( byte ) vmid.hashCode();
+ public static long listenerId = vmid.hashCode();
}
Index: org/apache/jcs/engine/behavior/ICacheEventQueue.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/engine/behavior/
ICacheEventQueue.java,v
retrieving revision 1.3
diff -u -r1.3 ICacheEventQueue.java
--- org/apache/jcs/engine/behavior/ICacheEventQueue.java 15 Apr 2004
19:22:53 -0000 1.3
+++ org/apache/jcs/engine/behavior/ICacheEventQueue.java 13 May 2004
21:34:22 -0000
@@ -69,7 +69,7 @@
*
* @return The listenerId value
*/
- public byte getListenerId();
+ public long getListenerId();
/** Description of the Method */
Index: org/apache/jcs/engine/behavior/ICacheListener.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-jcs/src/java/org/apache/jcs/engine/behavior/
ICacheListener.java,v
retrieving revision 1.3
diff -u -r1.3 ICacheListener.java
--- org/apache/jcs/engine/behavior/ICacheListener.java 15 Apr 2004 19:22:53
-0000 1.3
+++ org/apache/jcs/engine/behavior/ICacheListener.java 13 May 2004 21:34:22
-0000
@@ -63,7 +63,7 @@
*
* @param id The new listenerId value
*/
- public void setListenerId( byte id )
+ public void setListenerId( long id )
throws IOException;
@@ -72,7 +72,7 @@
*
* @return The listenerId value
*/
- public byte getListenerId()
+ public long getListenerId()
throws IOException;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]