[jboss-cvs] JBossCache/src/org/jboss/cache ...
Manik Surtani
msurtani at jboss.com
Tue Aug 15 17:02:23 EDT 2006
User: msurtani
Date: 06/08/15 17:02:23
Modified: src/org/jboss/cache Cache.java CacheSPI.java
TreeCache.java TreeCacheProxyImpl.java
Log:
Habanero stabilisation efforts
Revision Changes Path
1.5 +22 -1 JBossCache/src/org/jboss/cache/Cache.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Cache.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/Cache.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- Cache.java 14 Aug 2006 17:20:35 -0000 1.4
+++ Cache.java 15 Aug 2006 21:02:23 -0000 1.5
@@ -32,24 +32,45 @@
Node getRoot();
/**
- * Adds a {@link CacheListener} to the cache
+ * Adds a {@link CacheListener} to the entire cache
* @param l listener to add
*/
void addCacheListener(CacheListener l);
/**
+ * Adds a {@link CacheListener} to a given region.
+ * @param region
+ * @param l
+ */
+ void addCacheListener(Fqn region, CacheListener l);
+
+ /**
* Removes a {@link CacheListener} from the cache
* @param l listener to remove
*/
void removeCacheListener(CacheListener l);
/**
+ * Removes a {@link CacheListener} from a given region.
+ * @param region
+ * @param l
+ */
+ void removeCacheListener(Fqn region, CacheListener l);
+
+ /**
* Retrieves an immutable {@link List} of {@link CacheListener}s attached to the cache.
* @return an immutable {@link List} of {@link CacheListener}s attached to the cache.
*/
Set<CacheListener> getCacheListeners();
/**
+ * Retrieves an immutable {@link List} of {@link CacheListener}s attached to a specific region.
+ * @return an immutable {@link List} of {@link CacheListener}s attached to a specific region.
+ */
+ Set<CacheListener> getCacheListeners(Fqn region);
+
+
+ /**
* Convenience method that allows for direct access to the data in a {@link Node}.
* @param fqn <b><i>absolute</i></b> {@link Fqn} to the {@link Node} to be accessed.
* @param key
1.6 +0 -2 JBossCache/src/org/jboss/cache/CacheSPI.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheSPI.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/CacheSPI.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- CacheSPI.java 20 Jul 2006 21:58:21 -0000 1.5
+++ CacheSPI.java 15 Aug 2006 21:02:23 -0000 1.6
@@ -149,6 +149,4 @@
List _gravitateData(Fqn fqn, boolean b, boolean b1);
- GlobalTransaction getCurrentTransaction(Transaction tx);
-
}
1.213 +2 -2 JBossCache/src/org/jboss/cache/TreeCache.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TreeCache.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TreeCache.java,v
retrieving revision 1.212
retrieving revision 1.213
diff -u -b -r1.212 -r1.213
--- TreeCache.java 14 Aug 2006 22:50:44 -0000 1.212
+++ TreeCache.java 15 Aug 2006 21:02:23 -0000 1.213
@@ -73,7 +73,7 @@
* @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
* @author Brian Stansberry
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Id: TreeCache.java,v 1.212 2006/08/14 22:50:44 msurtani Exp $
+ * @version $Id: TreeCache.java,v 1.213 2006/08/15 21:02:23 msurtani Exp $
* <p/>
* @see <a href="http://labs.jboss.com/portal/jbosscache/docs">JBossCache doc</a>
*/
@@ -4261,7 +4261,7 @@
public CacheSPI getCacheSPI()
{
- throw new UnsupportedOperationException("IMPLEMENT ME!!");
+ return new TreeCacheProxyImpl(this, (NodeImpl) root);
}
protected void notifyCacheStopped()
1.10 +16 -1 JBossCache/src/org/jboss/cache/TreeCacheProxyImpl.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TreeCacheProxyImpl.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TreeCacheProxyImpl.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- TreeCacheProxyImpl.java 14 Aug 2006 17:52:35 -0000 1.9
+++ TreeCacheProxyImpl.java 15 Aug 2006 21:02:23 -0000 1.10
@@ -164,16 +164,31 @@
treeCache.addTreeCacheListener(l);
}
+ public void addCacheListener(Fqn region, CacheListener l)
+ {
+ throw new UnsupportedOperationException("Not implemented in this release");
+ }
+
public void removeCacheListener(CacheListener l)
{
treeCache.removeTreeCacheListener(l);
}
+ public void removeCacheListener(Fqn region, CacheListener l)
+ {
+ throw new UnsupportedOperationException("Not implemented in this release");
+ }
+
public Set<CacheListener> getCacheListeners()
{
return treeCache.getTreeCacheListeners();
}
+ public Set<CacheListener> getCacheListeners(Fqn region)
+ {
+ throw new UnsupportedOperationException("Not implemented in this release");
+ }
+
public void put(Fqn fqn, Object key, Object value)
{
treeCache.put(fqn, key, value);
@@ -488,7 +503,7 @@
public GlobalTransaction getCurrentTransaction(Transaction tx)
{
- throw new RuntimeException("TODO: Need to figure out how to deal with these.");
+ return treeCache.getCurrentTransaction(tx);
}
More information about the jboss-cvs-commits
mailing list