[jboss-cvs] JBossCache/src/org/jboss/cache ...
Brian Stansberry
brian.stansberry at jboss.com
Sun Aug 13 16:10:11 EDT 2006
User: bstansberry
Date: 06/08/13 16:10:11
Modified: src/org/jboss/cache Tag: Branch_JBossCache_1_4_0_MUX
Fqn.java Version.java TreeCache.java
TreeCacheView2.java
Log:
Update to 1.4.0.SP1
Revision Changes Path
No revision
No revision
1.31.4.2 +2 -1 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.4.1
retrieving revision 1.31.4.2
diff -u -b -r1.31.4.1 -r1.31.4.2
--- Fqn.java 21 Jul 2006 02:51:28 -0000 1.31.4.1
+++ Fqn.java 13 Aug 2006 20:10:10 -0000 1.31.4.2
@@ -39,7 +39,7 @@
* 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 $
+ * @version $Revision: 1.31.4.2 $
*/
public class Fqn implements Cloneable, Externalizable {
@@ -262,6 +262,7 @@
* @see #getName
*/
public Object getLast() {
+ if (isRoot()) return SEPARATOR;
return elements.get(elements.size() - 1);
}
1.18.4.3 +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.2
retrieving revision 1.18.4.3
diff -u -b -r1.18.4.2 -r1.18.4.3
--- Version.java 21 Jul 2006 02:51:28 -0000 1.18.4.2
+++ Version.java 13 Aug 2006 20:10:10 -0000 1.18.4.3
@@ -6,12 +6,12 @@
* Contains version information about this release of TreeCache.
*
* @author Bela Ban
- * @version $Id: Version.java,v 1.18.4.2 2006/07/21 02:51:28 bstansberry Exp $
+ * @version $Id: Version.java,v 1.18.4.3 2006/08/13 20:10:10 bstansberry Exp $
*/
public class Version {
- 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 $";
+ public static final String version="1.4.0.SP1";
+ public static byte[] version_id={'0', '1', '4', '0', 'S', 'P', '1'};
+ public static final String cvs="$Id: Version.java,v 1.18.4.3 2006/08/13 20:10:10 bstansberry Exp $";
private static final int MAJOR_SHIFT = 11;
private static final int MINOR_SHIFT = 6;
1.195.2.1.2.5 +59 -23 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.4
retrieving revision 1.195.2.1.2.5
diff -u -b -r1.195.2.1.2.4 -r1.195.2.1.2.5
--- TreeCache.java 21 Jul 2006 02:51:28 -0000 1.195.2.1.2.4
+++ TreeCache.java 13 Aug 2006 20:10:10 -0000 1.195.2.1.2.5
@@ -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.4 2006/07/21 02:51:28 bstansberry Exp $
+ * @version $Id: TreeCache.java,v 1.195.2.1.2.5 2006/08/13 20:10:10 bstansberry Exp $
* <p/>
* @see <a href="http://labs.jboss.com/portal/jbosscache/docs">JBossCache doc</a>
*/
@@ -712,7 +712,7 @@
public void setEvictionPolicyConfig(Element config)
{
evictConfig_ = config;
- log.info("setEvictionPolicyConfig(): " + config);
+ if (log.isDebugEnabled()) log.debug("setEvictionPolicyConfig(): " + config);
}
/**
@@ -778,7 +778,7 @@
// Remove the trailing ':'
buffer.setLength(buffer.length() - 1);
setClusterProperties(buffer.toString());
- log.info("setting cluster properties from xml to: " + cluster_props);
+ if (log.isDebugEnabled()) log.debug("setting cluster properties from xml to: " + cluster_props);
}
@@ -1229,10 +1229,13 @@
if (channel == null)
throw new ChannelNotConnectedException();
boolean rc = channel.getState(null, timeout);
+ if (log.isDebugEnabled())
+ {
if (rc)
- log.info("fetchState(): state was retrieved successfully");
+ log.debug("fetchState(): state was retrieved successfully");
else
- log.info("fetchState(): state could not be retrieved (first member)");
+ log.debug("fetchState(): state could not be retrieved (first member)");
+ }
}
/**
@@ -1337,13 +1340,13 @@
switch (cache_mode)
{
case LOCAL:
- log.info("cache mode is local, will not create the channel");
+ log.debug("cache mode is local, will not create the channel");
break;
case REPL_SYNC:
case REPL_ASYNC:
case INVALIDATION_ASYNC:
case INVALIDATION_SYNC:
- log.info("cache mode is " + mode2String(cache_mode));
+ log.debug("cache mode is " + mode2String(cache_mode));
if (channel != null)
{ // already started
log.info("channel is already running");
@@ -1367,8 +1370,6 @@
}
channel = new JChannel(cluster_props);
channel.setOpt(Channel.GET_STATE_EVENTS, Boolean.TRUE);
- if (log.isTraceEnabled())
- log.trace("cache properties: " + cluster_props);
}
channel.setOpt(Channel.AUTO_RECONNECT, Boolean.TRUE);
channel.setOpt(Channel.AUTO_GETSTATE, Boolean.TRUE);
@@ -1421,8 +1422,7 @@
channel.connect(cluster_name);
processNewView(channel.getView());
- if (log.isInfoEnabled())
- log.info("TreeCache local address is " + channel.getLocalAddress());
+ if (log.isInfoEnabled()) log.info("TreeCache local address is " + channel.getLocalAddress());
if (getFetchStateOnStartup())
{
fetchStateOnStartup();
@@ -1581,7 +1581,7 @@
else
{
this.usingEviction = false;
- log.info("Not using an EvictionPolicy");
+ log.debug("Not using an EvictionPolicy");
}
}
@@ -2510,7 +2510,8 @@
{
if (fetchTransientState || fetchPersistentState)
{
- log.info("locking the " + fqn + " subtree to return the in-memory (transient) state");
+ if (log.isDebugEnabled())
+ log.info("locking the subtree at " + fqn + " to transfer state");
acquireLocksForStateTransfer(rootNode, owner, timeout, true, force);
}
@@ -5332,7 +5333,9 @@
{
if (new_state == null)
- my_log.info("transferred state is null (may be first member in cluster)");
+ {
+ if (my_log.isDebugEnabled()) my_log.debug("transferred state is null (may be first member in cluster)");
+ }
else
TreeCache.this._setState(new_state, root, null);
@@ -5366,6 +5369,39 @@
{
log.info("viewAccepted() for " + cluster_name + ": " + new_view);
processNewView(new_view);
+
+ Vector new_mbrs = new_view.getMembers();
+
+ // todo: if MergeView, fetch and reconcile state from coordinator
+ // actually maybe this is best left up to the application ? we just notify them and let
+ // the appl handle it ?
+
+ log.info("viewAccepted(): " + new_view);
+ synchronized (members)
+ {
+ boolean needNotification = false;
+ if (new_mbrs != null)
+ {
+ // Determine what members have been removed
+ // and roll back any tx and break any locks
+ Vector removed = (Vector) members.clone();
+ removed.removeAll(new_mbrs);
+ removeLocksForDeadMembers(root, removed);
+
+ members.removeAllElements();
+ members.addAll(new_view.getMembers());
+
+ needNotification = true;
+ }
+
+ coordinator = determineCoordinator();
+
+ // now notify listeners - *after* updating the coordinator. - JBCACHE-662
+ if (needNotification) notifyViewChange(new_view);
+
+ // Wake up any thread waiting in fetchStateOnStartup
+ members.notifyAll();
+ }
}
@@ -5743,7 +5779,7 @@
}
}
- protected void notifyNodeRemove(Fqn fqn, boolean pre)
+ public void notifyNodeRemove(Fqn fqn, boolean pre)
{
if (evictionPolicyListener != null)
{
@@ -5765,7 +5801,7 @@
}
}
- protected void notifyNodeRemoved(Fqn fqn)
+ public void notifyNodeRemoved(Fqn fqn)
{
if (evictionPolicyListener != null)
{
@@ -5778,7 +5814,7 @@
}
}
- protected void notifyNodeEvict(Fqn fqn, boolean pre)
+ public void notifyNodeEvict(Fqn fqn, boolean pre)
{
if (evictionPolicyListener != null)
{
@@ -5800,7 +5836,7 @@
}
}
- protected void notifyNodeEvicted(Fqn fqn)
+ public void notifyNodeEvicted(Fqn fqn)
{
if (evictionPolicyListener != null)
{
@@ -5814,7 +5850,7 @@
}
- protected void notifyNodeModify(Fqn fqn, boolean pre)
+ public void notifyNodeModify(Fqn fqn, boolean pre)
{
if (evictionPolicyListener != null)
{
@@ -5836,7 +5872,7 @@
}
}
- protected void notifyNodeModified(Fqn fqn)
+ public void notifyNodeModified(Fqn fqn)
{
if (evictionPolicyListener != null)
{
@@ -5850,7 +5886,7 @@
}
- protected void notifyNodeVisited(Fqn fqn)
+ public void notifyNodeVisited(Fqn fqn)
{
if (evictionPolicyListener != null)
{
1.10.4.2 +0 -0 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.4.1
retrieving revision 1.10.4.2
diff -u -b -r1.10.4.1 -r1.10.4.2
--- TreeCacheView2.java 21 Jul 2006 02:51:28 -0000 1.10.4.1
+++ TreeCacheView2.java 13 Aug 2006 20:10:10 -0000 1.10.4.2
@@ -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.4.1 $
+ * @version $Revision: 1.10.4.2 $
*/
public class TreeCacheView2 {
static TreeCacheGui2 gui_=null;
More information about the jboss-cvs-commits
mailing list