[jboss-cvs] JBossCache/src/org/jboss/cache ...
Brian Stansberry
brian.stansberry at jboss.com
Thu Jul 20 22:51:28 EDT 2006
User: bstansberry
Date: 06/07/20 22:51:28
Modified: src/org/jboss/cache Tag: Branch_JBossCache_1_4_0_MUX
Fqn.java AbstractTreeCacheListener.java
AbstractNode.java Version.java TreeCache.java
TreeCacheView2.java
Log:
Sync to JBossCache_1_4_0_GA
Revision Changes Path
No revision
No revision
1.31.4.1 +35 -13 JBossCache/src/org/jboss/cache/Fqn.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Fqn.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/Fqn.java,v
retrieving revision 1.31
retrieving revision 1.31.4.1
diff -u -b -r1.31 -r1.31.4.1
--- Fqn.java 27 Apr 2006 15:40:16 -0000 1.31
+++ Fqn.java 21 Jul 2006 02:51:28 -0000 1.31.4.1
@@ -25,8 +25,21 @@
/**
* Fully qualified name. A list of relatives names, which can be any Object,
* from root to a given node. This class is immutable.
- *
- * @version $Revision: 1.31 $
+ * <p />
+ * Note that<br>
+ * <p />
+ * <code>Fqn f = new Fqn("/a/b/c");</code>
+ * <p />
+ * is <b>not</b> the same as
+ * <p />
+ * <code>Fqn f = Fqn.fromString("/a/b/c");</code>
+ * <p />
+ * The former will result in a single Fqn, called "/a/b/c" which hangs directly under Fqn.ROOT.
+ * <p />
+ * The latter will result in 3 Fqns, called "a", "b" and "c", where "c" is a child of "b", "b" is a child of "a", and "a" hangs off Fqn.ROOT.
+ * <p />
+ * Another way to look at it is that the "/" separarator is only parsed when it form sa part of a String passed in to Fqn.fromString() and not otherwise.
+ * @version $Revision: 1.31.4.1 $
*/
public class Fqn implements Cloneable, Externalizable {
@@ -92,7 +105,9 @@
}
/**
- * Constructs a single element FQN.
+ * Constructs a single element Fqn. Note that if a String is passed in, separator characters {@link #SEPARATOR} are <b>not</b> parsed.
+ * If you wish these to be parsed, use {@link #fromString(String)}.
+ * @see #fromString(String)
*/
public Fqn(Object name) {
elements = Collections.singletonList(name);
@@ -177,15 +192,22 @@
/**
* Returns a new FQN from a string, where the elements are deliminated by
- * one or more / characters.
- * Example use:
- <pre>
- Fqn.fromString("/a//b/c/");
- </pre>
- is equivalent to:
- <pre>
- new Fqn(new Object[] { "a", "b", "c" });
- </pre>
+ * one or more separator ({@link #SEPARATOR}) characters.<br><br>
+ * Example use:<br>
+ * <pre>
+ * Fqn.fromString("/a//b/c/");
+ * </pre><br>
+ * is equivalent to:<br>
+ * <pre>
+ * new Fqn(new Object[] { "a", "b", "c" });
+ * </pre><br>
+ * but not<br>
+ * <pre>
+ * new Fqn("/a/b/c");
+ * </pre>
+ *
+ * @see #Fqn(Object[])
+ * @see #Fqn(Object)
*/
public static Fqn fromString(String fqn) {
if (fqn == null)
@@ -407,7 +429,7 @@
public String getName()
{
if (isRoot()) return SEPARATOR;
- else return String.valueOf(elements.get(elements.size() - 1));
+ else return String.valueOf(getLast());
}
/**
1.2.22.1 +4 -1 JBossCache/src/org/jboss/cache/Attic/AbstractTreeCacheListener.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: AbstractTreeCacheListener.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/Attic/AbstractTreeCacheListener.java,v
retrieving revision 1.2
retrieving revision 1.2.22.1
diff -u -b -r1.2 -r1.2.22.1
--- AbstractTreeCacheListener.java 2 Sep 2005 18:32:41 -0000 1.2
+++ AbstractTreeCacheListener.java 21 Jul 2006 02:51:28 -0000 1.2.22.1
@@ -12,7 +12,10 @@
import org.jgroups.View;
/**
- * TODO: add java doc
+ * An abstract implementation of {@link TreeCacheListener} and {@link ExtendedTreeCacheListener}. Subclass this if you
+ * don't want to implement all the methods in the {@link TreeCacheListener} and {@link ExtendedTreeCacheListener}
+ * interfaces.
+ *
* @author hmesha
*/
public abstract class AbstractTreeCacheListener implements TreeCacheListener, ExtendedTreeCacheListener
1.16.4.1 +1 -1 JBossCache/src/org/jboss/cache/AbstractNode.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: AbstractNode.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/AbstractNode.java,v
retrieving revision 1.16
retrieving revision 1.16.4.1
diff -u -b -r1.16 -r1.16.4.1
--- AbstractNode.java 13 Apr 2006 00:19:31 -0000 1.16
+++ AbstractNode.java 21 Jul 2006 02:51:28 -0000 1.16.4.1
@@ -45,7 +45,7 @@
*/
public Object getName()
{
- return fqn.getName();
+ return fqn.getLast();
}
/**
1.18.4.2 +4 -4 JBossCache/src/org/jboss/cache/Version.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Version.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/Version.java,v
retrieving revision 1.18.4.1
retrieving revision 1.18.4.2
diff -u -b -r1.18.4.1 -r1.18.4.2
--- Version.java 27 Jun 2006 00:11:25 -0000 1.18.4.1
+++ Version.java 21 Jul 2006 02:51:28 -0000 1.18.4.2
@@ -6,12 +6,12 @@
* Contains version information about this release of TreeCache.
*
* @author Bela Ban
- * @version $Id: Version.java,v 1.18.4.1 2006/06/27 00:11:25 bstansberry Exp $
+ * @version $Id: Version.java,v 1.18.4.2 2006/07/21 02:51:28 bstansberry Exp $
*/
public class Version {
- public static final String version="1.4.0.CR2";
- public static byte[] version_id={'0', '1', '4', '0', 'c'};
- public static final String cvs="$Id: Version.java,v 1.18.4.1 2006/06/27 00:11:25 bstansberry Exp $";
+ public static final String version="1.4.0.GA";
+ public static byte[] version_id={'0', '1', '4', '0'};
+ public static final String cvs="$Id: Version.java,v 1.18.4.2 2006/07/21 02:51:28 bstansberry Exp $";
private static final int MAJOR_SHIFT = 11;
private static final int MINOR_SHIFT = 6;
1.195.2.1.2.4 +5 -5 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.195.2.1.2.3
retrieving revision 1.195.2.1.2.4
diff -u -b -r1.195.2.1.2.3 -r1.195.2.1.2.4
--- TreeCache.java 27 Jun 2006 00:11:25 -0000 1.195.2.1.2.3
+++ TreeCache.java 21 Jul 2006 02:51:28 -0000 1.195.2.1.2.4
@@ -79,7 +79,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.195.2.1.2.3 2006/06/27 00:11:25 bstansberry Exp $
+ * @version $Id: TreeCache.java,v 1.195.2.1.2.4 2006/07/21 02:51:28 bstansberry Exp $
* <p/>
* @see <a href="http://labs.jboss.com/portal/jbosscache/docs">JBossCache doc</a>
*/
@@ -4186,7 +4186,7 @@
}
if (log.isTraceEnabled())
- log.trace("callRemoteMethods(): valid members are " + validMembers + " methods: " + method_call.getArgs()[0]);
+ log.trace("callRemoteMethods(): valid members are " + validMembers + " method: " + method_call);
// checkForNonSerializableArgs(method_call);
@@ -4215,11 +4215,11 @@
CacheException ex;
if (rsp.wasSuspected())
{
- ex = new SuspectException("suspected member: " + rsp.getSender());
+ ex = new SuspectException("Response suspected: " + rsp);
}
else
{
- ex = new TimeoutException("timeout for " + rsp.getSender());
+ ex = new TimeoutException("Response timed out: " + rsp);
}
retval.add(new ReplicationException("rsp=" + rsp, ex));
}
1.10.4.1 +20 -15 JBossCache/src/org/jboss/cache/TreeCacheView2.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TreeCacheView2.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TreeCacheView2.java,v
retrieving revision 1.10
retrieving revision 1.10.4.1
diff -u -b -r1.10 -r1.10.4.1
--- TreeCacheView2.java 18 May 2006 15:46:18 -0000 1.10
+++ TreeCacheView2.java 21 Jul 2006 02:51:28 -0000 1.10.4.1
@@ -65,7 +65,7 @@
* The view itself caches only the nodes, but doesn't cache any of the data (HashMap) associated with it. When
* data needs to be displayed, the underlying tree will be accessed directly.
*
- * @version $Revision: 1.10 $
+ * @version $Revision: 1.10.4.1 $
*/
public class TreeCacheView2 {
static TreeCacheGui2 gui_=null;
@@ -395,7 +395,8 @@
else
fqn=fqn + SEP + component_name;
}
- data=getData(fqn);
+
+ data=getData(Fqn.fromString(fqn));
if(data != null) {
mainPanel.add(tablePanel, BorderLayout.SOUTH);
populateTable(data);
@@ -446,12 +447,12 @@
}
public void nodeModified(Fqn fqn) {
- // Map data;
- //data=getData(fqn);
- //populateTable(data); REVISIT
+ Map data;
+ data=getData(fqn);
/*
poulateTable is the current table being shown is the info of the node. that is modified.
*/
+ populateTable(data);
}
public void nodeVisited(Fqn fqn)
@@ -663,7 +664,8 @@
}
}
- Map getData(String fqn) {
+ Map getData(Fqn fqn) {
+ /*
Map data;
Set keys;
String key;
@@ -680,6 +682,9 @@
data.put(key, value);
}
return data;
+ */
+ // Retreive it directly from internal cache bypassing the lock such there is no chance of deadlock.
+ return cache_._getData(fqn);
}
@@ -971,7 +976,7 @@
class AddModifyDataForNodeAction extends AbstractAction {
private static final long serialVersionUID = -7656592171312920825L;
public void actionPerformed(ActionEvent e) {
- Map data=getData(selected_node);
+ Map data=getData(Fqn.fromString(selected_node));
if(data != null && data.size() > 0) {
}
else {
More information about the jboss-cvs-commits
mailing list