From: Bela B. <be...@us...> - 2003-03-06 18:13:28
|
User: belaban Date: 03/03/06 10:13:27 Modified: src/main/org/jboss/cache Cache.java CacheException.java CacheImpl.java CacheImplMBean.java CacheImplTest.java CacheKey.java CacheListener.java CacheValue.java DeadlockException.java KeyNotExistsException.java LockingException.java LockingPolicy.java Options.java SimpleEvictionPolicy.java TimeoutException.java Update.java UpgradeException.java Log: Formatted correctly (replaced tabs with spaces) Revision Changes Path 1.15 +12 -32 jboss-cache/src/main/org/jboss/cache/Cache.java Index: Cache.java =================================================================== RCS file: /cvsroot/jboss/jboss-cache/src/main/org/jboss/cache/Cache.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- Cache.java 19 Feb 2003 19:07:56 -0000 1.14 +++ Cache.java 6 Mar 2003 18:13:21 -0000 1.15 @@ -1,4 +1,4 @@ -// $Id: Cache.java,v 1.14 2003/02/19 19:07:56 belaban Exp $ +// $Id: Cache.java,v 1.15 2003/03/06 18:13:21 belaban Exp $ /* * JBoss, the OpenSource J2EE webOS @@ -10,12 +10,10 @@ package org.jboss.cache; +import javax.transaction.xa.XAResource; import java.util.Collection; import java.util.Map; import java.util.Set; -import javax.transaction.xa.XAResource; - - /** @@ -70,7 +68,7 @@ * * // turn replication on, use asynchronous replication by default, cache group is "demo" * cache.configure("file:/home/bela/async-cache.xml"); - * + * * // 1. Add an entry. Will be replicated asynchronously to all caches in the cluster * // (call returns immediately) * cache.put("name", "Bela Ban"); @@ -78,7 +76,7 @@ * // 2. Add a transient entry. Although replication is on by default, * // this entry won't be replicated * cache.put("age", new Integer(37), new Options(Options.TRANSIENT)); - * + * * // 3. Now it will get replicated * cache.setTransience("age", false); // transient = false * @@ -102,13 +100,13 @@ * opts=new Options(Options.REPL_SYNC, 7000, 5000, 10000, false); * cache.put("item2", opts); * - * // Remove an entry from the cache. Wait 1 sec for all responses, + * // Remove an entry from the cache. Wait 1 sec for all responses, * // try to fetch the lock (if not yet held) for 5 seconds, hold it for * // a maximum of 10 secs and don't commit the transaction * opts=new Options(Options.REPL_SYNC, 1000, 5000, 10000, false); * cache. remove("name", opts); * - * // Now commit the transaction. This will add "item2" (*NOT* "item1", + * // Now commit the transaction. This will add "item2" (*NOT* "item1", * // which has already been added) and remove "name"); * cache.commit(); * @@ -117,7 +115,7 @@ * associating them with the current thread, we should explicitly specify Xids * in begin(), commit() and rollback(). * @author <a href="mailto:be...@jb...">Bela Ban</a>. - * @version $Revision: 1.14 $ + * @version $Revision: 1.15 $ * * <p><b>Revisions:</b> * <p>Dec 27 2002 Bela Ban: first implementation @@ -129,7 +127,7 @@ * @param l The CacheListener */ void addListener(CacheListener l); - + /** * Removes a cache listener * @param l The CacheListener @@ -140,8 +138,8 @@ * Sets the default properties for this cache implementation // todo: find a better type (URL ?) */ void configure(Object properties); - - + + /** * Returns the number of entries in this map. * @return the number of entries in this map. @@ -163,7 +161,6 @@ boolean containsKey(Object key); - /** * Returns the value to which this map maps the specified key. Returns * <tt>null</tt> if the map contains no mapping for this key. A return @@ -179,7 +176,6 @@ Object get(Object key); - /** * Returns a set view of the keys contained in this map. The set is * <em>not</em> backed by the map, so changes to the map are <em>not</em> @@ -241,9 +237,6 @@ Object put(Object key, Object value, Options update_options) throws CacheException, TimeoutException, LockingException; - - - /** * Adds all values from a map to this map. Existing entries will be * overwritten. Updates will be handled according to the default policy. @@ -257,7 +250,7 @@ * LockingException will be thrown. */ void putAll(Map m) throws CacheException, TimeoutException, LockingException; - + /** * Adds all values from a map to this map. Existing entries will be * overwritten. Updates will be handled according to the default policy. @@ -273,11 +266,8 @@ * LockingException will be thrown. */ void putAll(Map m, Options update_options) throws CacheException, TimeoutException, LockingException; - - - /** * Removes an entry from the cache according to the default policy. If the key cannot be found, this * is a null operation. @@ -313,11 +303,6 @@ Object remove(Object key, Options update_options) throws CacheException, TimeoutException, LockingException; - - - - - /** * Removes all entries from the map. Replication takes place acording to the * default policy. @@ -332,7 +317,6 @@ void clear() throws CacheException, TimeoutException, LockingException; - /** * Removes all entries from the map. Replication takes place acording to the * default policy. @@ -349,10 +333,6 @@ void clear(Options update_options) throws CacheException, TimeoutException, LockingException; - - - - /** * Changes an entry from transient to non-transient and vice versa. If an * entry has been transient up to now, and becomes non-transient, it's @@ -370,7 +350,7 @@ * in the cache */ void setTransience(Object key, boolean transient_entry) throws KeyNotExistsException; - + /** * Returns the mode of an entry (whether it is transient or not). * @param key The key denoting the object 1.8 +3 -3 jboss-cache/src/main/org/jboss/cache/CacheException.java Index: CacheException.java =================================================================== RCS file: /cvsroot/jboss/jboss-cache/src/main/org/jboss/cache/CacheException.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- CacheException.java 16 Feb 2003 01:08:12 -0000 1.7 +++ CacheException.java 6 Mar 2003 18:13:21 -0000 1.8 @@ -1,4 +1,4 @@ -// $Id: CacheException.java,v 1.7 2003/02/16 01:08:12 belaban Exp $ +// $Id: CacheException.java,v 1.8 2003/03/06 18:13:21 belaban Exp $ /* * JBoss, the OpenSource J2EE webOS @@ -16,7 +16,7 @@ * CacheException, mother of all cache exceptions * * @author <a href="mailto:be...@jb...">Bela Ban</a>. - * @version $Revision: 1.7 $ + * @version $Revision: 1.8 $ * * <p><b>Revisions:</b> * @@ -32,7 +32,7 @@ public CacheException(String msg) { super(msg); } - + public CacheException(String msg, Throwable cause) { super(msg, cause); } 1.29 +289 -304 jboss-cache/src/main/org/jboss/cache/CacheImpl.java Index: CacheImpl.java =================================================================== RCS file: /cvsroot/jboss/jboss-cache/src/main/org/jboss/cache/CacheImpl.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- CacheImpl.java 19 Feb 2003 19:07:56 -0000 1.28 +++ CacheImpl.java 6 Mar 2003 18:13:21 -0000 1.29 @@ -1,4 +1,4 @@ -// $Id: CacheImpl.java,v 1.28 2003/02/19 19:07:56 belaban Exp $ +// $Id: CacheImpl.java,v 1.29 2003/03/06 18:13:21 belaban Exp $ /* * JBoss, the OpenSource J2EE webOS @@ -10,7 +10,6 @@ package org.jboss.cache; - import org.javagroups.*; import org.javagroups.blocks.ReplicationManager; import org.javagroups.blocks.ReplicationReceiver; @@ -34,12 +33,12 @@ * putAll(), remove() or clear()) are called without a transaction associated * with the current thread. * @author Bela Ban - * @version $Revision: 1.28 $ + * @version $Revision: 1.29 $ */ public class CacheImpl extends ServiceMBeanSupport implements CacheImplMBean { - private boolean trace=log != null? log.isTraceEnabled() : false; - private boolean debug=log != null? log.isDebugEnabled() : false; - private boolean info=log != null? log.isInfoEnabled() : false; + private boolean trace=log != null ? log.isTraceEnabled() : false; + private boolean debug=log != null ? log.isDebugEnabled() : false; + private boolean info=log != null ? log.isInfoEnabled() : false; Channel channel=null; ReplicationManager repl_mgr=null; @@ -47,14 +46,12 @@ ReplicationReceiver repl_receiver=new ReplicationReceiverAdapter(); - - /** Contains the cache entries (keys={@link CacheKey}s, * values={@link CacheValue}s). The keys will * be added according in sorted order according to their timestamp. This * allows the eviction policy handler to quickly remove e.g. the oldest * items. - */ + */ TreeMap map=new TreeMap(); /** Name of the cluster. All caches with the same name will form a cluster */ @@ -83,7 +80,7 @@ /** Max number of miliseconds a lock is held. If this is exceeded the lock wil be automatically released. * Note that this is currently not used. */ - long lock_lease_timeout=60*1000; + long lock_lease_timeout=60 * 1000; /** The default caching mode is asynchronous replication */ int caching_mode=Options.REPL_ASYNC; @@ -282,7 +279,7 @@ * @param locking_policy The locking_policy to set */ public void setLockingPolicy(LockingPolicy locking_policy) { - this.locking_policy = locking_policy; + this.locking_policy=locking_policy; } @@ -345,27 +342,27 @@ return map.get(new CacheKey(key)); } - /** + /** * Returns a <em>copy</em> of the keys in the cache.<br/> * TODO: implement locking * @return Set of Objects - * @see org.jboss.cache.Cache#keySet() - */ - public Set keySet() { - // TODO: implement locking. Define semantics of iterating over changing cache keys - - CacheKey k; - Set s = new TreeSet(); - for (Iterator it = map.keySet().iterator(); it.hasNext();) { - k = (CacheKey) it.next(); - s.add(k.getKey()); - } - return s; - } + * @see org.jboss.cache.Cache#keySet() + */ + public Set keySet() { + // TODO: implement locking. Define semantics of iterating over changing cache keys + + CacheKey k; + Set s=new TreeSet(); + for(Iterator it=map.keySet().iterator(); it.hasNext();) { + k=(CacheKey)it.next(); + s.add(k.getKey()); + } + return s; + } /** * Returns a <em>copy</em> of the values in the cache<br/> - * TODO: implement locking + * TODO: implement locking * @return Collection of Objects * @see org.jboss.cache.Cache#values() */ @@ -408,19 +405,19 @@ clear(getDefaultOptions()); } - /** - * @see org.jboss.cache.Cache#clear(org.jboss.cache.Options) - */ - public void clear(Options update_options) throws CacheException, TimeoutException, LockingException { - Update update = null; - if (update_options == null) { - if (trace) - log.trace("clear(): update_options was null, using default oprions"); - update_options = getDefaultOptions(); - } - update = new Update(Update.CLEAR, update_options); - handleUpdate(update); - } + /** + * @see org.jboss.cache.Cache#clear(org.jboss.cache.Options) + */ + public void clear(Options update_options) throws CacheException, TimeoutException, LockingException { + Update update=null; + if(update_options == null) { + if(trace) + log.trace("clear(): update_options was null, using default oprions"); + update_options=getDefaultOptions(); + } + update=new Update(Update.CLEAR, update_options); + handleUpdate(update); + } /** * @see org.jboss.cache.Cache#put(java.lang.Object, java.lang.Object) @@ -429,21 +426,20 @@ return put(key, value, getDefaultOptions()); } - /** - * @see org.jboss.cache.Cache#put(java.lang.Object, java.lang.Object, org.jboss.cache.Options) - */ - public Object put(Object key, Object value, Options update_options) - throws CacheException, TimeoutException, LockingException { + /** + * @see org.jboss.cache.Cache#put(java.lang.Object, java.lang.Object, org.jboss.cache.Options) + */ + public Object put(Object key, Object value, Options update_options) + throws CacheException, TimeoutException, LockingException { Update update=null; - if (update_options == null) { + if(update_options == null) { if(trace) log.trace("put(): update_options was null, using default oprions"); - update_options = getDefaultOptions(); - } + update_options=getDefaultOptions(); + } update=new Update(Update.PUT, key, value, update_options); - return handleUpdate(update); - } - + return handleUpdate(update); + } /** @@ -457,16 +453,16 @@ /** * @see org.jboss.cache.Cache#putAll(java.util.Map, org.jboss.cache.Options) */ - public void putAll(Map m, Options update_options) throws CacheException, TimeoutException, LockingException { - Update update = null; - if (update_options == null) { - if (trace) - log.trace("putAll(): update_options was null, using default oprions"); - update_options = getDefaultOptions(); - } - update = new Update(Update.PUT_ALL, map, update_options); - handleUpdate(update); - } + public void putAll(Map m, Options update_options) throws CacheException, TimeoutException, LockingException { + Update update=null; + if(update_options == null) { + if(trace) + log.trace("putAll(): update_options was null, using default oprions"); + update_options=getDefaultOptions(); + } + update=new Update(Update.PUT_ALL, map, update_options); + handleUpdate(update); + } /** @@ -481,15 +477,15 @@ * @see org.jboss.cache.Cache#remove(java.lang.Object, org.jboss.cache.Options) */ public Object remove(Object key, Options update_options) - throws CacheException, TimeoutException, LockingException { + throws CacheException, TimeoutException, LockingException { Update update=null; - if (update_options == null) { - if(trace) - log.trace("remove(): update_options was null, using default oprions"); - update_options = getDefaultOptions(); - } - update=new Update(Update.REMOVE, key, update_options); - return handleUpdate(update); + if(update_options == null) { + if(trace) + log.trace("remove(): update_options was null, using default oprions"); + update_options=getDefaultOptions(); + } + update=new Update(Update.REMOVE, key, update_options); + return handleUpdate(update); } /* ---------------------------- Interface XAResource --------------------------- */ @@ -573,18 +569,18 @@ if(cluster_properties == null) { log.warn("CacheImpl.createService(): cluster properties not set; using default properties"); cluster_properties="UDP(mcast_addr=230.1.2.3;mcast_port=25000;ip_ttl=32;" + - "mcast_send_buf_size=64000;mcast_recv_buf_size=80000):" + - "PING(timeout=2000;num_initial_members=3):" + - "MERGE2(min_interval=5000;max_interval=10000):" + - "FD:" + - "VERIFY_SUSPECT(timeout=1500):" + - "pbcast.STABLE(desired_avg_gossip=20000):" + - "pbcast.NAKACK(gc_lag=50;retransmit_timeout=800,1200,2400,4800):" + - "UNICAST(timeout=800,1200,2400,4800):" + - "FRAG(frag_size=8096;down_thread=false;up_thread=false):" + - "pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;" + - "shun=false;print_local_addr=true):" + - "pbcast.STATE_TRANSFER"; + "mcast_send_buf_size=64000;mcast_recv_buf_size=80000):" + + "PING(timeout=2000;num_initial_members=3):" + + "MERGE2(min_interval=5000;max_interval=10000):" + + "FD:" + + "VERIFY_SUSPECT(timeout=1500):" + + "pbcast.STABLE(desired_avg_gossip=20000):" + + "pbcast.NAKACK(gc_lag=50;retransmit_timeout=800,1200,2400,4800):" + + "UNICAST(timeout=800,1200,2400,4800):" + + "FRAG(frag_size=8096;down_thread=false;up_thread=false):" + + "pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;" + + "shun=false;print_local_addr=true):" + + "pbcast.STATE_TRANSFER"; } if(eviction_policy_classname != null && eviction_policy_classname.trim().length() > 0) { @@ -603,7 +599,7 @@ } else { log.warn("CacheImpl.createService(): channel was not null (should have been null); " + - "channel was not created"); + "channel was not created"); } if(debug) @@ -659,28 +655,24 @@ log.info("CacheImpl.createService(): service was started"); } - /** - * @see org.jboss.system.ServiceMBeanSupport#stopService() - */ - public void stopService() throws Exception { - if (eviction_policy != null) - eviction_policy.stop(); - if (repl_mgr != null) { - repl_mgr.stop(); - repl_mgr = null; - } - if (channel != null) { - channel.disconnect(); - if (info) - log.info("CacheImpl.stopService(): channel was disconnected"); - } - - log.info("CacheImpl.stopService(): service was stopped"); - } - - - + /** + * @see org.jboss.system.ServiceMBeanSupport#stopService() + */ + public void stopService() throws Exception { + if(eviction_policy != null) + eviction_policy.stop(); + if(repl_mgr != null) { + repl_mgr.stop(); + repl_mgr=null; + } + if(channel != null) { + channel.disconnect(); + if(info) + log.info("CacheImpl.stopService(): channel was disconnected"); + } + log.info("CacheImpl.stopService(): service was stopped"); + } /** @@ -729,15 +721,15 @@ // TODO: check for lock (might be locked by another transaction) CacheKey old_key=null; old_key=(CacheKey)map.put(new CacheKey(key), new CacheValue(value)); - return old_key != null? old_key.getKey() : null; + return old_key != null ? old_key.getKey() : null; } public Object _put(CacheKey key, CacheValue value) throws LockingException { // TODO: check for lock (might be locked by another transaction) - CacheKey old_key; - old_key=(CacheKey)map.put(key, value); - return old_key != null? old_key.getKey() : null; + CacheKey old_key; + old_key=(CacheKey)map.put(key, value); + return old_key != null ? old_key.getKey() : null; } @@ -750,27 +742,27 @@ map.clear(); } - /** - * - * @param key - * @return Object - */ - public Object _remove(Object key) { + /** + * + * @param key + * @return Object + */ + public Object _remove(Object key) { - // TODO: check for lock (might be locked by another transaction) + // TODO: check for lock (might be locked by another transaction) CacheKey old_key=null; - old_key=(CacheKey)map.remove(key); - return old_key != null? old_key.getKey() : null; - } - - /** - * Method _putAll. - * @param map - */ - public void _putAll(Map map) { - // TODO: check for lock (might be locked by another transaction) - map.putAll(map); - } + old_key=(CacheKey)map.remove(key); + return old_key != null ? old_key.getKey() : null; + } + + /** + * Method _putAll. + * @param map + */ + public void _putAll(Map map) { + // TODO: check for lock (might be locked by another transaction) + map.putAll(map); + } /** @@ -795,49 +787,47 @@ * @return Object An object if the original method needs a return value. * Otherwise the caller will simply discard this return value. */ - Object handleUpdate(Update update) throws CacheException, TimeoutException, LockingException { - Options opts = update != null ? update.getUpdateOptions() : null; - if (opts == null) { - log.error("handleUpdate(): options == null"); - return null; - } - - if (opts.getCachingMode() == Options.TRANSIENT) - return handleTransientUpdate(update); - else - return handleReplicatedUpdate(update); - } + Object handleUpdate(Update update) throws CacheException, TimeoutException, LockingException { + Options opts=update != null ? update.getUpdateOptions() : null; + if(opts == null) { + log.error("handleUpdate(): options == null"); + return null; + } + if(opts.getCachingMode() == Options.TRANSIENT) + return handleTransientUpdate(update); + else + return handleReplicatedUpdate(update); + } /** - * Handles a transient update. Update is purely local, but still needs to - * observe locked entries. For example, when another node has an entry X - * locked, this update will have to wait until that entry is released (or - * a timeout occurred). - * @param update Update object. Guaranteed to be non-null - * @return Object - * @throws TimeoutException - * @throws LockingException - */ + * Handles a transient update. Update is purely local, but still needs to + * observe locked entries. For example, when another node has an entry X + * locked, this update will have to wait until that entry is released (or + * a timeout occurred). + * @param update Update object. Guaranteed to be non-null + * @return Object + * @throws TimeoutException + * @throws LockingException + */ Object handleTransientUpdate(Update update) throws TimeoutException, LockingException { - switch (update.getOperation()) { - case Update.PUT: - return _put(new CacheKey(update.getKey()), new CacheValue(update.getValue(), true)); + switch(update.getOperation()) { + case Update.PUT: + return _put(new CacheKey(update.getKey()), new CacheValue(update.getValue(), true)); case Update.PUT_ALL: _putAll(update.getMap()); case Update.REMOVE: return _remove(update.getKey()); - case Update.CLEAR: + case Update.CLEAR: _clear(); - default : + default : log.error("handleTransientUpdate(): operation unknown (" + update.getOperation() + ")"); - return null; - } + return null; + } } - /** * Handles a replicated update. Will broadcast the update to all nodes * (using org.javagroups.blocks.ReplicationManager) and then wait for all @@ -852,21 +842,21 @@ * @throws TimeoutException * @throws LockingException */ - Object handleReplicatedUpdate(Update update) throws CacheException, TimeoutException, LockingException { + Object handleReplicatedUpdate(Update update) throws CacheException, TimeoutException, LockingException { RspList rsps; - byte[] data=null; + byte[] data=null; Options opts; boolean synchronous=true; - Object retval=null; + Object retval=null; - if(repl_mgr == null) + if(repl_mgr == null) throw new CacheException("handleReplicatedUpdate(): replication manager is null, cannot replicate update"); try { data=Util.objectToByteBuffer(update); } catch(Throwable t) { - throw new CacheException("handleReplicatedUpdate(): error serializing update", t); + throw new CacheException("handleReplicatedUpdate(): error serializing update", t); } opts=update.getUpdateOptions(); @@ -886,58 +876,55 @@ update.getTransaction() != null); //only check for results if the call was synchronous - if (synchronous) { - if (rsps == null) // this should *not* happen - log.error("handleReplicatedUpdate(): response list was null"); - else - checkResults(rsps); // will check for exceptions - } + if(synchronous) { + if(rsps == null) // this should *not* happen + log.error("handleReplicatedUpdate(): response list was null"); + else + checkResults(rsps); // will check for exceptions + } return retval; - } + } /** - * Checks whether responses from members contain exceptions or timeouts. - * Throws an exception if that is the case - * @param rsps - * @throws TimeoutException - * @throws LockingException - */ - void checkResults(RspList rsps) throws TimeoutException, LockingException { - Map ml = null; - List ll = null; - LockingException l = null; - TimeoutException t = null; - Rsp rsp; - - for (int i = 0; i < rsps.size(); i++) { - rsp = (Rsp) rsps.elementAt(i); - - // check for exceptions - if (rsp.getValue() != null && rsp.getValue() instanceof Throwable) { - if (l == null) { - l = new LockingException(ml = new HashMap()); - } - ml.put(rsp.getSender(), rsp.getValue()); - } - - if (l != null) - throw l; - - // check for timeouts - if (rsp.wasReceived() == false) { - if (t == null) - t = new TimeoutException(ll = new ArrayList()); - ll.add(rsp.getSender()); - } - } - - if (t != null) - throw t; - } + * Checks whether responses from members contain exceptions or timeouts. + * Throws an exception if that is the case + * @param rsps + * @throws TimeoutException + * @throws LockingException + */ + void checkResults(RspList rsps) throws TimeoutException, LockingException { + Map ml=null; + List ll=null; + LockingException l=null; + TimeoutException t=null; + Rsp rsp; + + for(int i=0; i < rsps.size(); i++) { + rsp=(Rsp)rsps.elementAt(i); + + // check for exceptions + if(rsp.getValue() != null && rsp.getValue() instanceof Throwable) { + if(l == null) { + l=new LockingException(ml=new HashMap()); + } + ml.put(rsp.getSender(), rsp.getValue()); + } + if(l != null) + throw l; + // check for timeouts + if(rsp.wasReceived() == false) { + if(t == null) + t=new TimeoutException(ll=new ArrayList()); + ll.add(rsp.getSender()); + } + } + if(t != null) + throw t; + } /** @@ -957,18 +944,18 @@ /** * All updates are received by this class. - * - * @author Bela Ban - * @version $Revision: 1.28 $ - */ - class ReplicationReceiverAdapter implements ReplicationReceiver { - - /** - * @see org.javagroups.blocks.ReplicationReceiver#commit(org.javagroups.blocks.Xid) - */ - public void commit(org.javagroups.blocks.Xid arg0) { - ; - } + * + * @author Bela Ban + * @version $Revision: 1.29 $ + */ + class ReplicationReceiverAdapter implements ReplicationReceiver { + + /** + * @see org.javagroups.blocks.ReplicationReceiver#commit(org.javagroups.blocks.Xid) + */ + public void commit(org.javagroups.blocks.Xid arg0) { + ; + } public Object receive(org.javagroups.blocks.Xid transaction, byte[] data, byte[] lock_info, @@ -979,20 +966,20 @@ Update update=null; - if (trace) { - StringBuffer sb = new StringBuffer(); - sb.append("receive(): "); - if (data != null) - sb.append(" data=").append(data.length).append(" bytes"); - sb.append(", use_locks=").append(use_locks); - if (use_locks) { - if (transaction != null) - sb.append("transaction=").append(transaction); - sb.append(", lock_acquisition_timeout=").append(lock_acquisition_timeout); - sb.append("lock_lease_timeout=").append(lock_lease_timeout); - } - log.trace(sb.toString()); - } + if(trace) { + StringBuffer sb=new StringBuffer(); + sb.append("receive(): "); + if(data != null) + sb.append(" data=").append(data.length).append(" bytes"); + sb.append(", use_locks=").append(use_locks); + if(use_locks) { + if(transaction != null) + sb.append("transaction=").append(transaction); + sb.append(", lock_acquisition_timeout=").append(lock_acquisition_timeout); + sb.append("lock_lease_timeout=").append(lock_lease_timeout); + } + log.trace(sb.toString()); + } if(data == null) { log.error("receive(): data is null; cannot apply update"); @@ -1013,92 +1000,90 @@ // TODO: implement locking updates } - return null; - } - - /** - * @see org.javagroups.blocks.ReplicationReceiver#rollback(org.javagroups.blocks.Xid) - */ - public void rollback(org.javagroups.blocks.Xid arg0) { - ; - } - - } + return null; + } + /** + * @see org.javagroups.blocks.ReplicationReceiver#rollback(org.javagroups.blocks.Xid) + */ + public void rollback(org.javagroups.blocks.Xid arg0) { + ; + } + } /** * This class handles initial state transfers to new members. - * - * @author Bela Ban - * @version $Revision: 1.28 $ - */ - class MessageListenerAdapter implements MessageListener { - - public void receive(Message msg) { - ; - } - - /** - * TODO: use read lock on entire hashmap while making copy - */ - public byte[] getState() { - Map copy = (Map) map.clone(); - - try { - return Util.objectToByteBuffer(copy); - } - catch (Throwable ex) { - log.error("getState(): exception marshalling state", ex); - return null; - } - } - - /** - * TODO: use write lock on entire hashmap to set state - */ - public void setState(byte[] state) { - Map new_copy; - - try { - new_copy = (Map) Util.objectFromByteBuffer(state); - if (new_copy == null) - return; - } - catch (Throwable ex) { - log.error("setState(): exception unmarshalling state", ex); - return; - } - - map.clear(); // remove all elements - map.putAll(new_copy); - log.info("setState(): hashmap has " + map.size() + " items"); - } - } + * + * @author Bela Ban + * @version $Revision: 1.29 $ + */ + class MessageListenerAdapter implements MessageListener { + + public void receive(Message msg) { + ; + } + + /** + * TODO: use read lock on entire hashmap while making copy + */ + public byte[] getState() { + Map copy=(Map)map.clone(); + + try { + return Util.objectToByteBuffer(copy); + } + catch(Throwable ex) { + log.error("getState(): exception marshalling state", ex); + return null; + } + } + + /** + * TODO: use write lock on entire hashmap to set state + */ + public void setState(byte[] state) { + Map new_copy; + + try { + new_copy=(Map)Util.objectFromByteBuffer(state); + if(new_copy == null) + return; + } + catch(Throwable ex) { + log.error("setState(): exception unmarshalling state", ex); + return; + } + + map.clear(); // remove all elements + map.putAll(new_copy); + log.info("setState(): hashmap has " + map.size() + " items"); + } + } class MembershipListenerAdapter implements MembershipListener { - /** - * @see org.javagroups.MembershipListener#viewAccepted(org.javagroups.View) - */ - public void viewAccepted(View view) { - // TODO: replace by log.info() + /** + * @see org.javagroups.MembershipListener#viewAccepted(org.javagroups.View) + */ + public void viewAccepted(View view) { +// TODO: replace by log.info() System.out.println("new view: " + view); - } + } - /** - * @see org.javagroups.MembershipListener#suspect(org.javagroups.Address) - */ - public void suspect(Address arg0) { - } - - /** - * @see org.javagroups.MembershipListener#block() - */ - public void block() { - } + /** + * @see org.javagroups.MembershipListener#suspect(org.javagroups.Address) + */ + public void suspect(Address arg0) { + } + + /** + * @see org.javagroups.MembershipListener#block() + */ + public void block() { + } } } 1.9 +27 -28 jboss-cache/src/main/org/jboss/cache/CacheImplMBean.java Index: CacheImplMBean.java =================================================================== RCS file: /cvsroot/jboss/jboss-cache/src/main/org/jboss/cache/CacheImplMBean.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- CacheImplMBean.java 19 Feb 2003 19:07:57 -0000 1.8 +++ CacheImplMBean.java 6 Mar 2003 18:13:22 -0000 1.9 @@ -1,4 +1,4 @@ -// $Id: CacheImplMBean.java,v 1.8 2003/02/19 19:07:57 belaban Exp $ +// $Id: CacheImplMBean.java,v 1.9 2003/03/06 18:13:22 belaban Exp $ /* * JBoss, the OpenSource J2EE webOS @@ -12,12 +12,11 @@ import org.jboss.system.ServiceMBean; - /** * CacheImplMBean interface. * * @author <a href="mailto:be...@jb...">Bela Ban</a>. - * @version $Revision: 1.8 $ + * @version $Revision: 1.9 $ * * <p><b>Revisions:</b> * @@ -29,22 +28,22 @@ /** Get the name of the replication group (e.g. JavaGroups) */ String getClusterName(); - + /** Set the name of the replication group */ void setClusterName(String name); - + /** Get the cluster properties (e.g. the protocol stack specification in case of JavaGroups) */ String getClusterProperties(); - + /** Set the cluster properties. If the cache is to use the new properties, it has to be redeployed */ void setClusterProperties(String cluster_properties); - + /** Get the maximum number of entries (cache eviction kicks in when reached) */ int getMaxCapacity(); - + /** Set the maximum number of entries (cache eviction kicks in when reached) */ void setMaxCapacity(int max_capacity); - + /** Get the max time to wait until the initial state is retrieved. * This is used in a replicating cache: when a new cache joins the cluster, * it needs to acquire the (replicated) state of the other members to @@ -54,10 +53,10 @@ * wait forever. */ long getInitialStateRetrievalTimeout(); - + /** Set the initial state transfer timeout (see {@link #getInitialStateRetrievalTimeout()}) */ void setInitialStateRetrievalTimeout(long timeout); - + /** Returns the current default caching mode. Possible values are * <ul> * <li>TRANSIENT @@ -67,56 +66,56 @@ * @return int The caching mode */ int getCachingMode(); - + /** Sets the default caching mode (see {@link #setCachingMode(int)}) */ void setCachingMode(int mode); /** * Returns the default max timeout after which synchronous replication calls - * return. + * return. * @return long Number of milliseconds after which a sync repl call must * return. 0 means to wait forever */ long getSyncReplTimeout(); - + /** Sets the default maximum wait time for synchronous replication to receive all results */ void setSyncReplTimeout(long timeout); - + /** * Default max time to wait for a lock. If the lock cannot be acquired * within this time, a LockingException will be thrown. * @return long Max number of milliseconds to wait for a lock to be acquired */ long getLockAcquisitionTimeout(); - + /** Set the max time for lock acquisition. A value of 0 means to wait forever (not recomended). * Note that lock acquisition timeouts may be removed in the future when we * have deadlock detection. * @param timeout */ void setLockAcquisitionTimeout(long timeout); - - /** Max time a lock can be held. After this time the lock is released. + + /** Max time a lock can be held. After this time the lock is released. * (Not currently used.) * @return long The max number of milliseconds to hold a lock */ long getLockLeaseTimeout(); - + /** Sets the max time a lock can be held */ void setLockLeaseTimeout(long timeout); - - /** Returns the name of the cache eviction policy (must be an implementation + + /** Returns the name of the cache eviction policy (must be an implementation * of EvictionPolicy) * @return Fully qualified name of a class implementing the EvictionPolicy * interface - */ + */ String getEvictionPolicyClass(); - - /** Sets the classname of the eviction policy */ + + /** Sets the classname of the eviction policy */ void setEvictionPolicyClass(String eviction_policy_classname); - - + + // TODO: add more eviction policy properties (e.g. eviction mode etc) - - + + } 1.4 +29 -29 jboss-cache/src/main/org/jboss/cache/CacheImplTest.java Index: CacheImplTest.java =================================================================== RCS file: /cvsroot/jboss/jboss-cache/src/main/org/jboss/cache/CacheImplTest.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- CacheImplTest.java 20 Jan 2003 05:30:24 -0000 1.3 +++ CacheImplTest.java 6 Mar 2003 18:13:23 -0000 1.4 @@ -1,4 +1,4 @@ -// $Id: CacheImplTest.java,v 1.3 2003/01/20 05:30:24 belaban Exp $ +// $Id: CacheImplTest.java,v 1.4 2003/03/06 18:13:23 belaban Exp $ /* * JBoss, the OpenSource J2EE webOS @@ -13,63 +13,63 @@ import java.util.HashMap; /** - * + * * @author Bela Ban - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ */ public class CacheImplTest { - - public static void main(String[] args) { + + public static void main(String[] args) { CacheImpl c=new CacheImpl(); - - - // c.setCachingMode(Options.TRANSIENT); - + +// c.setCachingMode(Options.TRANSIENT); + + try { System.out.println("-- creating replicated cache"); c.createService(); - + System.out.println("-- starting cache"); c.startService(); - - - c.put("name", "Bela Ban"); + + + c.put("name", "Bela Ban"); System.out.println("cache size is " + c.size()); - System.out.println("value for \"name\" is " + c.get("name")); - - CacheKey k1, k2; + System.out.println("value for \"name\" is " + c.get("name")); + + CacheKey k1, k2; k1=new CacheKey("name"); k2=new CacheKey("name"); - + HashMap map=new HashMap(); - + if(k1.equals(k2)) System.out.println("is equal"); else System.out.println("not equals"); - + map.put(k1, "value for k1"); map.put(k2, "value for k2"); - + System.out.println("size(): " + map.size() + ", value for \"name\": " + map.get("name")); - + ArrayList l=new ArrayList(); if(!l.contains(k1)) l.add(k1); - + if(!l.contains(k2)) l.add(k2); - + System.out.println("size(): " + l.size() + ", first element: " + l.get(0)); - } - catch (TimeoutException e) { - } - catch (LockingException e) { - } + } + catch(TimeoutException e) { + } + catch(LockingException e) { + } catch(Throwable t) { System.err.println("exception is " + t); } - } + } } 1.6 +43 -44 jboss-cache/src/main/org/jboss/cache/CacheKey.java Index: CacheKey.java =================================================================== RCS file: /cvsroot/jboss/jboss-cache/src/main/org/jboss/cache/CacheKey.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- CacheKey.java 16 Feb 2003 01:08:12 -0000 1.5 +++ CacheKey.java 6 Mar 2003 18:13:23 -0000 1.6 @@ -1,4 +1,4 @@ -// $Id: CacheKey.java,v 1.5 2003/02/16 01:08:12 belaban Exp $ +// $Id: CacheKey.java,v 1.6 2003/03/06 18:13:23 belaban Exp $ /* * JBoss, the OpenSource J2EE webOS @@ -14,31 +14,30 @@ import java.io.ObjectOutput; - /** * Wraps cache keys, which are sorted according to creation time. This may be * useful for cache eviction policies, which may want to evict the oldest * entries first. If the TreeMap is already sorted, these policies do not have * to iterate through the entire map. * @author Bela Ban - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ * todo Test null values */ public class CacheKey implements Comparable, Externalizable { - Object key = null; - long timestamp = System.currentTimeMillis(); + Object key=null; + long timestamp=System.currentTimeMillis(); - /** - * Constructor for CacheKey. Used for externalization - */ - public CacheKey() { - super(); - } + /** + * Constructor for CacheKey. Used for externalization + */ + public CacheKey() { + super(); + } /** Constructor, takes a key */ - public CacheKey(Object key) { - this.key = key; - } + public CacheKey(Object key) { + this.key=key; + } /** @@ -54,65 +53,65 @@ * @param key The key to set */ public void setKey(Object key) { - this.key = key; + this.key=key; } - public long getTimestamp() { - return timestamp; - } + public long getTimestamp() { + return timestamp; + } - public void setTimestamp(long new_timestamp) { - timestamp = new_timestamp; - } + public void setTimestamp(long new_timestamp) { + timestamp=new_timestamp; + } - public int hashCode() { - return key != null ? key.hashCode() : 0; - } + public int hashCode() { + return key != null ? key.hashCode() : 0; + } /** Compares by comparing keys, <em>not</em> timestamps */ - public boolean equals(Object obj) { - // return compareTo(obj) == 0; + public boolean equals(Object obj) { + // return compareTo(obj) == 0; CacheKey other=(CacheKey)obj; if(key == null && other.key == null) return true; return key.equals(other.key); - } + } /** Use by the TreeMap (in CacheImpl) to determine sort order. The order is * on timestamp. * @see java.lang.Comparable#compareTo(Object) */ - public int compareTo(Object obj) { - long ts2 = ((CacheKey) obj).timestamp; - return timestamp == ts2 ? 0 : (timestamp < ts2 ? -1 : 1); - } + public int compareTo(Object obj) { + long ts2=((CacheKey)obj).timestamp; + return timestamp == ts2 ? 0 : (timestamp < ts2 ? -1 : 1); + } - public String toString() { - return key != null ? key.toString() : null; - } + public String toString() { + return key != null ? key.toString() : null; + } - /** + /** * Only read the value; the timestamp is already set (in the null * constructor) - * @see java.io.Externalizable#readExternal(java.io.ObjectInput) - */ - public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { + * @see java.io.Externalizable#readExternal(java.io.ObjectInput) + */ + public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { if(in.readBoolean()) { key=in.readObject(); } - } + } - /** + /** * We only send the value, not the timestamp. The timestamp will be * recreated in the other member processes (current time there (which may * be different than ours)). - * @see java.io.Externalizable#writeExternal(java.io.ObjectOutput) - */ - public void writeExternal(ObjectOutput out) throws IOException { + * @see java.io.Externalizable#writeExternal(java.io.ObjectOutput) + */ + public void writeExternal(ObjectOutput out) throws IOException { if(key != null) { out.writeBoolean(true); out.writeObject(key); @@ -120,6 +119,6 @@ else { out.writeBoolean(false); } - } + } } 1.6 +6 -7 jboss-cache/src/main/org/jboss/cache/CacheListener.java Index: CacheListener.java =================================================================== RCS file: /cvsroot/jboss/jboss-cache/src/main/org/jboss/cache/CacheListener.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- CacheListener.java 31 Dec 2002 22:26:24 -0000 1.5 +++ CacheListener.java 6 Mar 2003 18:13:23 -0000 1.6 @@ -1,4 +1,4 @@ -// $Id: CacheListener.java,v 1.5 2002/12/31 22:26:24 belaban Exp $ +// $Id: CacheListener.java,v 1.6 2003/03/06 18:13:23 belaban Exp $ /* * JBoss, the OpenSource J2EE webOS @@ -12,18 +12,17 @@ import java.util.Map; - /** * Cache notification interface. We can register with a cache ({@link * Cache#addListener(CacheListener)}) to receive notifications when * modifications are made to the cache. * * @author <a href="mailto:be...@jb...">Bela Ban</a>. - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ */ public interface CacheListener { - + /** * Called after the entire contents of the map have been set. This is more * efficient than calling {@link #entrySet(Object,Object,Object)} on each @@ -32,12 +31,12 @@ * the map. */ void contentsInitialized(Map m); - + /** * Called after the entire contents of the map have been deleted */ void contentsCleared(); - + /** * Called after an entry has been set. This could be the addition of a new * entry, or the modification of an existing entry. @@ -46,7 +45,7 @@ * @param old_value The value previously associated with <code>key</code> */ void entrySet(Object key, Object value, Object old_value); - + /** * Called after an entry has been removed. * @param key The key identifying the entry 1.4 +45 -47 jboss-cache/src/main/org/jboss/cache/CacheValue.java Index: CacheValue.java =================================================================== RCS file: /cvsroot/jboss/jboss-cache/src/main/org/jboss/cache/CacheValue.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- CacheValue.java 20 Jan 2003 05:30:25 -0000 1.3 +++ CacheValue.java 6 Mar 2003 18:13:23 -0000 1.4 @@ -1,4 +1,4 @@ -// $Id: CacheValue.java,v 1.3 2003/01/20 05:30:25 belaban Exp $ +// $Id: CacheValue.java,v 1.4 2003/03/06 18:13:23 belaban Exp $ /* * JBoss, the OpenSource J2EE webOS @@ -14,55 +14,54 @@ import java.io.ObjectOutput; - /** * Wrapper for values in the hashmap. Contains aditional information about the * entry, such as caching mode (e.g. transient, replicated) etc. * @author Bela Ban - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ * @see CacheKey */ public class CacheValue implements Externalizable { - + /** The wrapped value */ Object value=null; - + /** True if this is a transient value (default = false) */ boolean is_transient=false; - - /** - * Constructor for CacheValue. - */ - public CacheValue() { - super(); - } - + + /** + * Constructor for CacheValue. + */ + public CacheValue() { + super(); + } + public CacheValue(Object value) { this.value=value; } - + public CacheValue(Object value, boolean is_transient) { this.value=value; this.is_transient=is_transient; } - /** - * Returns the value. - * @return Object - */ - public Object getValue() { - return value; - } - - /** - * Sets the value. - * @param value The value to set - */ - public void setValue(Object value) { - this.value = value; - } + /** + * Returns the value. + * @return Object + */ + public Object getValue() { + return value; + } + + /** + * Sets the value. + * @param value The value to set + */ + public void setValue(Object value) { + this.value=value; + } /** * Returns the is_transient. @@ -77,24 +76,24 @@ * @param is_transient The is_transient to set */ public void setTransient(boolean is_transient) { - this.is_transient = is_transient; + this.is_transient=is_transient; } - /** - * @see java.io.Externalizable#readExternal(java.io.ObjectInput) - */ - public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { + /** + * @see java.io.Externalizable#readExternal(java.io.ObjectInput) + */ + public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { if(in.readBoolean()) { value=in.readObject(); } is_transient=in.readBoolean(); - } + } - /** - * @see java.io.Externalizable#writeExternal(java.io.ObjectOutput) - */ - public void writeExternal(ObjectOutput out) throws IOException { + /** + * @see java.io.Externalizable#writeExternal(java.io.ObjectOutput) + */ + public void writeExternal(ObjectOutput out) throws IOException { if(value != null) { out.writeBoolean(true); out.writeObject(value); @@ -103,13 +102,13 @@ out.writeBoolean(false); } out.writeBoolean(is_transient); - } + } - /** - * @see java.lang.Object#toString() - */ - public String toString() { - StringBuffer sb=new StringBuffer(); + /** + * @see java.lang.Object#toString() + */ + public String toString() { + StringBuffer sb=new StringBuffer(); if(value != null) sb.append(value.toString()); else @@ -117,8 +116,7 @@ if(is_transient) sb.append(" (transient)"); return sb.toString(); - } - + } } 1.4 +9 -11 jboss-cache/src/main/org/jboss/cache/DeadlockException.java Index: DeadlockException.java =================================================================== RCS file: /cvsroot/jboss/jboss-cache/src/main/org/jboss/cache/DeadlockException.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- DeadlockException.java 16 Feb 2003 01:08:12 -0000 1.3 +++ DeadlockException.java 6 Mar 2003 18:13:23 -0000 1.4 @@ -1,4 +1,4 @@ -// $Id: DeadlockException.java,v 1.3 2003/02/16 01:08:12 belaban Exp $ +// $Id: DeadlockException.java,v 1.4 2003/03/06 18:13:23 belaban Exp $ /* * JBoss, the OpenSource J2EE webOS @@ -10,23 +10,21 @@ package org.jboss.cache; - - /** * Used when a lock acquisition would cause a deadlock. This will only be used * once deadlock detection is in place. * @author Bela Ban - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ */ public class DeadlockException extends LockingException { - /** - * Constructor for DeadlockException. - * @param msg - */ - public DeadlockException(String msg) { - super(msg); - } + /** + * Constructor for DeadlockException. + * @param msg + */ + public DeadlockException(String msg) { + super(msg); + } public DeadlockException(String msg, Throwable cause) { super(msg, cause); 1.4 +2 -3 jboss-cache/src/main/org/jboss/cache/KeyNotExistsException.java Index: KeyNotExistsException.java =================================================================== RCS file: /cvsroot/jboss/jboss-cache/src/main/org/jboss/cache/KeyNotExistsException.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- KeyNotExistsException.java 31 Dec 2002 22:18:47 -0000 1.3 +++ KeyNotExistsException.java 6 Mar 2003 18:13:24 -0000 1.4 @@ -1,4 +1,4 @@ -// $Id: KeyNotExistsException.java,v 1.3 2002/12/31 22:18:47 belaban Exp $ +// $Id: KeyNotExistsException.java,v 1.4 2003/03/06 18:13:24 belaban Exp $ /* * JBoss, the OpenSource J2EE webOS @@ -10,11 +10,10 @@ package org.jboss.cache; - /** * A key in the cache does not exist, but we tried to access it. * @author <a href="mailto:be...@jb...">Bela Ban</a> - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ */ public class KeyNotExistsException extends CacheException { 1.6 +21 -22 jboss-cache/src/main/org/jboss/cache/LockingException.java Index: LockingException.java =================================================================== RCS file: /cvsroot/jboss/jboss-cache/src/main/org/jboss/cache/LockingException.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- LockingException.java 19 Jan 2003 01:27:11 -0000 1.5 +++ LockingException.java 6 Mar 2003 18:13:24 -0000 1.6 @@ -1,4 +1,4 @@ -// $Id: LockingException.java,v 1.5 2003/01/19 01:27:11 belaban Exp $ +// $Id: LockingException.java,v 1.6 2003/03/06 18:13:24 belaban Exp $ /* * JBoss, the OpenSource J2EE webOS @@ -12,13 +12,12 @@ import java.util.Map; - /** * Used for all locking-related exceptions, e.g. when a lock could not be * acquired within the timeout, or when a deadlock was detected. * * @author <a href="mailto:be...@jb...">Bela Ban</a>. - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ * * <p><b>Revisions:</b> * @@ -26,42 +25,42 @@ */ public class LockingException extends CacheException { - + /** A list of all nodes that failed to acquire a lock */ Map failed_lockers=null; public LockingException() { super(); } - + public LockingException(Map failed_lockers) { - super(); - this.failed_lockers=failed_lockers; - } + super(); + this.failed_lockers=failed_lockers; + } public LockingException(String msg) { super(msg); } - + public LockingException(String msg, Map failed_lockers) { - super(msg); - this.failed_lockers=failed_lockers; - } - + super(msg); + this.failed_lockers=failed_lockers; + } + public LockingException(String msg, Throwable cause) { super(msg, cause); } - + public LockingException(String msg, Throwable cause, Map failed_lockers) { - super(msg, cause); - this.failed_lockers=failed_lockers; - } - - public String toString() { + super(msg, cause); + this.failed_lockers=failed_lockers; + } + + public String toString() { String retval=super.toString(); - if(failed_lockers != null && failed_lockers.size() >0) + if(failed_lockers != null && failed_lockers.size() > 0) retval=retval + ", failed lockers: " + failed_lockers; return retval; - } - + } + } 1.4 +15 -15 jboss-cache/src/main/org/jboss/cache/LockingPolicy.java Index: LockingPolicy.java =================================================================== RCS file: /cvsroot/jboss/jboss-cache/src/main/org/jboss/cache/LockingPolicy.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- LockingPolicy.java 16 Feb 2003 01:08:12 -0000 1.3 +++ LockingPolicy.java 6 Mar 2003 18:13:24 -0000 1.4 @@ -1,4 +1,4 @@ -// $Id: LockingPolicy.java,v 1.3 2003/02/16 01:08:12 belaban Exp $ +// $Id: LockingPolicy.java,v 1.4 2003/03/06 18:13:24 belaban Exp $ /* * JBoss, the OpenSource J2EE webOS @@ -16,12 +16,12 @@ * maintain some form of locking table, where they associate transactions and * the locks acquired by a transaction. * @author Bela Ban - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ */ public interface LockingPolicy { - /** Sets the cache on wh... [truncated message content] |