Package org.infinispan.distribution.ch

Examples of org.infinispan.distribution.ch.UnionConsistentHash


   public NodeTopologyInfo informRehashOnJoin(Address a, boolean starting, NodeTopologyInfo nodeTopologyInfo) {
      log.trace("Informed of a JOIN by {0}.  Starting? {1}", a, starting);
      if (!starting) {
         if (consistentHash instanceof UnionConsistentHash) {
            UnionConsistentHash uch = (UnionConsistentHash) consistentHash;
            consistentHash = uch.getNewConsistentHash();
            oldConsistentHash = null;
         }
         joiner = null;           
      } else {
         topologyInfo.addNodeTopologyInfo(a, nodeTopologyInfo);
         log.trace("Node topology info added({0}).  Topology info is {1}", nodeTopologyInfo, topologyInfo);        
         ConsistentHash chOld = consistentHash;
         if (chOld instanceof UnionConsistentHash) throw new RuntimeException("Not expecting a union CH!");
         oldConsistentHash = chOld;
         joiner = a;       
         ConsistentHash chNew = ConsistentHashHelper.createConsistentHash(configuration, chOld.getCaches(), topologyInfo, a);
         consistentHash = new UnionConsistentHash(chOld, chNew);
      }
      log.trace("New CH is {0}", consistentHash);
      return topologyInfo.getNodeTopologyInfo(rpcManager.getAddress());
   }
View Full Code Here


   public NodeTopologyInfo informRehashOnJoin(Address a, boolean starting, NodeTopologyInfo nodeTopologyInfo) {
      if (trace) log.trace("Informed of a JOIN by %s.  Starting? %s", a, starting);
      if (!starting) {
         if (consistentHash instanceof UnionConsistentHash) {
            UnionConsistentHash uch = (UnionConsistentHash) consistentHash;
            consistentHash = uch.getNewConsistentHash();
            oldConsistentHash = null;
         }
         joiner = null;
      } else {
         topologyInfo.addNodeTopologyInfo(a, nodeTopologyInfo);
         if (trace) log.trace("Node topology info added(%s).  Topology info is %s", nodeTopologyInfo, topologyInfo);
         ConsistentHash chOld = consistentHash;
         if (chOld instanceof UnionConsistentHash) throw new RuntimeException("Not expecting a union CH!");
         oldConsistentHash = chOld;
         joiner = a;
         ConsistentHash chNew = ConsistentHashHelper.createConsistentHash(configuration, chOld.getCaches(), topologyInfo, a);
         consistentHash = new UnionConsistentHash(chOld, chNew);
      }
      if (trace) log.trace("New CH is %s", consistentHash);
      return topologyInfo.getNodeTopologyInfo(rpcManager.getAddress());
   }
View Full Code Here

   public NodeTopologyInfo informRehashOnJoin(Address a, boolean starting, NodeTopologyInfo nodeTopologyInfo) {
      if (trace) log.trace("Informed of a JOIN by %s.  Starting? %s", a, starting);
      if (!starting) {
         if (consistentHash instanceof UnionConsistentHash) {
            UnionConsistentHash uch = (UnionConsistentHash) consistentHash;
            consistentHash = uch.getNewConsistentHash();
            oldConsistentHash = null;
         }
         joiner.set(null);
      } else {
         topologyInfo.addNodeTopologyInfo(a, nodeTopologyInfo);
         if (trace) log.trace("Node topology info added(%s).  Topology info is %s", nodeTopologyInfo, topologyInfo);
         ConsistentHash chOld = consistentHash;
         if (chOld instanceof UnionConsistentHash)
            throw new RuntimeException("Not expecting an instance of UnionConsistentHash!");
         oldConsistentHash = chOld;
         joiner.set(a);
         ConsistentHash chNew = ConsistentHashHelper.createConsistentHash(configuration, chOld.getCaches(), topologyInfo, a);
         consistentHash = new UnionConsistentHash(chOld, chNew);
      }
      if (trace) log.trace("New ConsistentHash is %s", consistentHash);
      return topologyInfo.getNodeTopologyInfo(rpcManager.getAddress());
   }
View Full Code Here

   public NodeTopologyInfo informRehashOnJoin(Address a, boolean starting, NodeTopologyInfo nodeTopologyInfo) {
      if (trace) log.trace("Informed of a JOIN by %s.  Starting? %s", a, starting);
      if (!starting) {
         if (consistentHash instanceof UnionConsistentHash) {
            UnionConsistentHash uch = (UnionConsistentHash) consistentHash;
            consistentHash = uch.getNewConsistentHash();
            oldConsistentHash = null;
         }
         joiner = null;
      } else {
         topologyInfo.addNodeTopologyInfo(a, nodeTopologyInfo);
         if (trace) log.trace("Node topology info added(%s).  Topology info is %s", nodeTopologyInfo, topologyInfo);
         ConsistentHash chOld = consistentHash;
         if (chOld instanceof UnionConsistentHash) throw new RuntimeException("Not expecting a union CH!");
         oldConsistentHash = chOld;
         joiner = a;
         ConsistentHash chNew = ConsistentHashHelper.createConsistentHash(configuration, chOld.getCaches(), topologyInfo, a);
         consistentHash = new UnionConsistentHash(chOld, chNew);
      }
      if (trace) log.trace("New CH is %s", consistentHash);
      return topologyInfo.getNodeTopologyInfo(rpcManager.getAddress());
   }
View Full Code Here

      if (trace) log.tracef("Informed of a JOIN by %s.  Starting? %s", a, starting);

      if (!starting) {
         if (consistentHash instanceof UnionConsistentHash) {
            UnionConsistentHash uch = (UnionConsistentHash) consistentHash;
            consistentHash = uch.getNewConsistentHash();
            oldConsistentHash = null;
         }
         joiner.set(null);
      } else {
         topologyInfo.addNodeTopologyInfo(a, nodeTopologyInfo);
         if (trace) log.tracef("Node topology info added(%s).  Topology info is %s", nodeTopologyInfo, topologyInfo);
         ConsistentHash chOld = consistentHash;
         if (chOld instanceof UnionConsistentHash)
            throw new RuntimeException("Not expecting an instance of UnionConsistentHash!");
         oldConsistentHash = chOld;
         joiner.set(a);
         ConsistentHash chNew = ConsistentHashHelper.createConsistentHash(configuration, chOld.getCaches(), topologyInfo, a);
         txTable.memberJoined(chNew, a);
         consistentHash = new UnionConsistentHash(chOld, chNew);
      }
      if (trace) log.tracef("New ConsistentHash is %s", consistentHash);
      return topologyInfo.getNodeTopologyInfo(rpcManager.getAddress());
   }
View Full Code Here

   public NodeTopologyInfo informRehashOnJoin(Address a, boolean starting, NodeTopologyInfo nodeTopologyInfo) {
      log.trace("Informed of a JOIN by {0}.  Starting? {1}", a, starting);
      if (!starting) {
         if (consistentHash instanceof UnionConsistentHash) {
            UnionConsistentHash uch = (UnionConsistentHash) consistentHash;
            consistentHash = uch.getNewConsistentHash();
            oldConsistentHash = null;
         }
         joiner = null;           
      } else {
         topologyInfo.addNodeTopologyInfo(a, nodeTopologyInfo);
         log.trace("Node topology info added({0}).  Topology info is {1}", nodeTopologyInfo, topologyInfo);        
         ConsistentHash chOld = consistentHash;
         if (chOld instanceof UnionConsistentHash) throw new RuntimeException("Not expecting a union CH!");
         oldConsistentHash = chOld;
         joiner = a;       
         ConsistentHash chNew = ConsistentHashHelper.createConsistentHash(configuration, chOld.getCaches(), topologyInfo, a);
         consistentHash = new UnionConsistentHash(chOld, chNew);
      }
      log.trace("New CH is {0}", consistentHash);
      return topologyInfo.getNodeTopologyInfo(rpcManager.getAddress());
   }
View Full Code Here

   public NodeTopologyInfo informRehashOnJoin(Address a, boolean starting, NodeTopologyInfo nodeTopologyInfo) {
      if (trace) log.trace("Informed of a JOIN by %s.  Starting? %s", a, starting);
      if (!starting) {
         if (consistentHash instanceof UnionConsistentHash) {
            UnionConsistentHash uch = (UnionConsistentHash) consistentHash;
            consistentHash = uch.getNewConsistentHash();
            oldConsistentHash = null;
         }
         joiner.set(null);
      } else {
         topologyInfo.addNodeTopologyInfo(a, nodeTopologyInfo);
         if (trace) log.trace("Node topology info added(%s).  Topology info is %s", nodeTopologyInfo, topologyInfo);
         ConsistentHash chOld = consistentHash;
         if (chOld instanceof UnionConsistentHash)
            throw new RuntimeException("Not expecting an instance of UnionConsistentHash!");
         oldConsistentHash = chOld;
         joiner.set(a);
         ConsistentHash chNew = ConsistentHashHelper.createConsistentHash(configuration, chOld.getCaches(), topologyInfo, a);
         consistentHash = new UnionConsistentHash(chOld, chNew);
      }
      if (trace) log.trace("New ConsistentHash is %s", consistentHash);
      return topologyInfo.getNodeTopologyInfo(rpcManager.getAddress());
   }
View Full Code Here

   public NodeTopologyInfo informRehashOnJoin(Address a, boolean starting, NodeTopologyInfo nodeTopologyInfo) {
      log.trace("Informed of a JOIN by {0}.  Starting? {1}", a, starting);
      if (!starting) {
         if (consistentHash instanceof UnionConsistentHash) {
            UnionConsistentHash uch = (UnionConsistentHash) consistentHash;
            consistentHash = uch.getNewConsistentHash();
            oldConsistentHash = null;
         }
         joiner = null;           
      } else {
         topologyInfo.addNodeTopologyInfo(a, nodeTopologyInfo);
         log.trace("Node topology info added({0}).  Topology info is {1}", nodeTopologyInfo, topologyInfo);        
         ConsistentHash chOld = consistentHash;
         if (chOld instanceof UnionConsistentHash) throw new RuntimeException("Not expecting a union CH!");
         oldConsistentHash = chOld;
         joiner = a;       
         ConsistentHash chNew = ConsistentHashHelper.createConsistentHash(configuration, chOld.getCaches(), topologyInfo, a);
         consistentHash = new UnionConsistentHash(chOld, chNew);
      }
      log.trace("New CH is {0}", consistentHash);
      return topologyInfo.getNodeTopologyInfo(rpcManager.getAddress());
   }
View Full Code Here

TOP

Related Classes of org.infinispan.distribution.ch.UnionConsistentHash

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.