[jboss-cvs] JBossCache/src/org/jboss/cache/xml ...
Galder Zamarreno
galder.zamarreno at jboss.com
Fri Sep 29 14:27:21 EDT 2006
User: gzamarreno
Date: 06/09/29 14:27:21
Modified: src/org/jboss/cache/xml XmlHelper.java
Log:
[JBCACHE-650] - SharedStoreCacheLoader refactored to SingletonStoreCacheLoader
adding the ability to push the in-memory state to the underlying cache loader when
assuming the coordinator role. Created AbstractDelegatingCacheLoader class that
contains basic delegating functionality. SingletonStoreCacheLoader and
AsyncCacheLoader now extend this class. Necessary configuration options added
and documentation has been updated to include explanation. Two singleton cache
sample configurations added too.
Revision Changes Path
1.12 +21 -0 JBossCache/src/org/jboss/cache/xml/XmlHelper.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: XmlHelper.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/xml/XmlHelper.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- XmlHelper.java 19 Jul 2006 05:20:12 -0000 1.11
+++ XmlHelper.java 29 Sep 2006 18:27:21 -0000 1.12
@@ -237,4 +237,25 @@
return null;
}
+ /**
+ * Retrieves the boolean value of a given attribute for the first encountered instance of a tag in an element.
+ * @param elem
+ * @param tagName
+ * @param attributeName
+ * @param defaultValue
+ */
+ public static boolean readBooleanAttribute(Element elem, String tagName, String attributeName, boolean defaultValue)
+ {
+ String val = getAttributeValue(elem, tagName, attributeName);
+ if (val != null)
+ {
+ if (val.equalsIgnoreCase("true") || val.equalsIgnoreCase("false"))
+ {
+ return Boolean.valueOf(val);
+ }
+ }
+
+ return defaultValue;
+ }
+
}
More information about the jboss-cvs-commits
mailing list