[jboss-cvs] JBossCache/src/org/jboss/cache ...

Vladmir Blagojevic vladimir.blagojevic at jboss.com
Thu Dec 7 17:20:23 EST 2006


  User: vblagojevic
  Date: 06/12/07 17:20:23

  Modified:    src/org/jboss/cache  TreeCache.java
  Log:
  [JBCACHE-315] work in progress (JGroups block event passed to interceptors)
  
  Revision  Changes    Path
  1.290     +21 -3     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.289
  retrieving revision 1.290
  diff -u -b -r1.289 -r1.290
  --- TreeCache.java	7 Dec 2006 20:01:19 -0000	1.289
  +++ TreeCache.java	7 Dec 2006 22:20:23 -0000	1.290
  @@ -94,7 +94,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.289 2006/12/07 20:01:19 bstansberry Exp $
  + * @version $Id: TreeCache.java,v 1.290 2006/12/07 22:20:23 vblagojevic Exp $
    *          <p/>
    * @see <a href="http://labs.jboss.com/portal/jbosscache/docs">JBossCache doc</a>
    */
  @@ -3195,6 +3195,11 @@
         }
      }
   
  +   public void _block()
  +   {
  +      log.info("Invoking block on " + getLocalAddress());
  +   }
  +
      private void moveFqns(Node node, Fqn newBase)
      {
         Fqn newFqn = new Fqn(newBase, ((TreeNode)node).getName());
  @@ -3358,9 +3363,18 @@
            }
            try
            {
  -            getStateTransferManager().setState(istream, Fqn.ROOT, null);
  +            MarshalledValueInputStream in = new MarshalledValueInputStream(istream);
  +            boolean hasState = in.readBoolean();
  +            if (!hasState)
  +            {
  +               in.close();
  +            }
  +            else
  +            {
  +               getStateTransferManager().setState(in, Fqn.ROOT, null);
               isStateSet = true;
            }
  +         }
            catch (Throwable t)
            {
               my_log.error("failed setting state", t);
  @@ -3542,10 +3556,14 @@
      }
   
      /**
  -    * Blocks sending and receiving of messages until viewAccepted() is called.
  +    * Indicates that a channel has received a BLOCK event from FLUSH protocol.
  +    * 
  +    * 
       */
      public void block()
      {
  +      MethodCall m = MethodCallFactory.create(MethodDeclarations.blockChannelLocal);
  +      invokeMethod(m);
      }
   
      /*------------------- End of MembershipListener ----------------------*/
  
  
  



More information about the jboss-cvs-commits mailing list