[jboss-cvs] JBossCache/src-50/org/jboss/cache/pojo/util ...
Ben Wang
bwang at jboss.com
Wed Jan 3 01:23:25 EST 2007
User: bwang
Date: 07/01/03 01:23:25
Modified: src-50/org/jboss/cache/pojo/util CacheApiUtil.java
Log:
upd
Revision Changes Path
1.7 +13 -5 JBossCache/src-50/org/jboss/cache/pojo/util/CacheApiUtil.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheApiUtil.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src-50/org/jboss/cache/pojo/util/CacheApiUtil.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- CacheApiUtil.java 2 Jan 2007 17:15:31 -0000 1.6
+++ CacheApiUtil.java 3 Jan 2007 06:23:25 -0000 1.7
@@ -19,22 +19,30 @@
* Utility for the 2.0 Cache API
*
* @author Ben Wang
- * @version $Id: CacheApiUtil.java,v 1.6 2007/01/02 17:15:31 msurtani Exp $
+ * @version $Id: CacheApiUtil.java,v 1.7 2007/01/03 06:23:25 bwang Exp $
*/
public class CacheApiUtil
{
+ public static Node XgetDataNode(CacheSPI cache, Fqn fqn)
+ {
+// cache.getInvocationContext().getOptionOverrides().setBypassInterceptorChain(true);
+ Node node = cache.getRoot().getChild(fqn);
+ if (node == null) return null;
+
+// cache.getInvocationContext().getOptionOverrides().setBypassInterceptorChain(false);
+ return node;
+ }
public static Set<Node> getNodeChildren(CacheSPI cache, Fqn fqn)
{
Node n = cache.getRoot().getChild(fqn);
- if (n == null) return null;
+ if(n == null) return null;
if (cache.getCacheLoaderManager() != null)
{
// We have cache loader, we can't get it directly from the local get.
return n.getChildren();
- }
- else
+ } else
{
Option option = cache.getInvocationContext().getOptionOverrides();
// WIll run into some race error in LocalTest for Set.
@@ -48,12 +56,12 @@
if (cache.getCacheLoaderManager() != null)
{
// Has cache loader
- return (cache.get(fqn, key) != null);
+ return (cache.get(fqn, key) != null) ? true : false;
}
Node node = cache.getRoot().getChild(fqn);
if (node == null) return false;
Map map = node.getData();
- return (map.keySet().contains(key));
+ return (map.keySet().contains(key)) ? true : false;
}
}
More information about the jboss-cvs-commits
mailing list