Package org.infinispan.remoting.transport

Examples of org.infinispan.remoting.transport.Transport


   @ManagedAttribute(description = "List of members in the cluster")
   @Metric(displayName = "Cluster members", dataType = DataType.TRAIT, displayType = DisplayType.SUMMARY)
   @SuppressWarnings("unused")
   public String getClusterMembers() {
      Transport t = getTransport();
      if (t == null) return "local";
      List<Address> addressList = t.getMembers();
      return addressList.toString();
   }
View Full Code Here


   @ManagedAttribute(description = "Size of the cluster in number of nodes")
   @Metric(displayName = "Cluster size", displayType = DisplayType.SUMMARY)
   @SuppressWarnings("unused")
   public int getClusterSize() {
      Transport t = getTransport();
      if (t == null) return 1;
      return t.getMembers().size();
   }
View Full Code Here

      return globalConfiguration.getClusterName();
   }

   public List<Address> getMembers() {
      if (globalComponentRegistry == null) return null;
      Transport t = globalComponentRegistry.getComponent(Transport.class);
      return t == null ? null : t.getMembers();
   }
View Full Code Here

      return t == null ? null : t.getMembers();
   }

   public Address getAddress() {
      if (globalComponentRegistry == null) return null;
      Transport t = globalComponentRegistry.getComponent(Transport.class);
      return t == null ? null : t.getAddress();
   }
View Full Code Here

      return t == null ? null : t.getAddress();
   }

   public boolean isCoordinator() {
      if (globalComponentRegistry == null) return false;
      Transport t = globalComponentRegistry.getComponent(Transport.class);
      return t != null && t.isCoordinator();
   }
View Full Code Here

   }

   private void join() throws Exception {
      startLatch.close();
      setJoinComplete(false);
      Transport t = rpcManager.getTransport();
      List<Address> members = t.getMembers();
      consistentHash = createConsistentHash(configuration, members);
      self = t.getAddress();
      if (members.size() > 1 && !t.getCoordinator().equals(self)) {
         JoinTask joinTask = new JoinTask(rpcManager, cf, configuration, dataContainer, this);
         joinFuture = rehashExecutor.submit(joinTask);
         //task will set joinComplete flag
      } else {
         setJoinComplete(true);
View Full Code Here

      }
   }

   private void join() throws Exception {
      startLatch.close();
      Transport t = rpcManager.getTransport();
      List<Address> members = t.getMembers();
      consistentHash = createConsistentHash(configuration, members);
      self = t.getAddress();
      if (members.size() > 1 && !t.getCoordinator().equals(self)) {
         JoinTask joinTask = new JoinTask(rpcManager, cf, configuration, dataContainer, this);
         joinFuture = rehashExecutor.submit(joinTask);
      } else {
         setJoinComplete(true);
      }
View Full Code Here

        private final CoreGroupCommunicationService service;
        private final SharedLocalYieldingClusterLockManager lockManager;

        ExtendedCacheManager(EmbeddedCacheManager container) {
            super(container, CacheContainer.DEFAULT_CACHE_NAME);
            Transport transport = container.getCache().getCacheManager().getTransport();
            if (transport != null) {
                Channel channel = ((org.infinispan.remoting.transport.jgroups.JGroupsTransport) transport).getChannel();
                this.service = new CoreGroupCommunicationService(Integer.valueOf(0).shortValue());
                service.setChannel(channel);
                this.lockManager = new SharedLocalYieldingClusterLockManager("lock", service, service);
View Full Code Here

      return globalConfiguration.getClusterName();
   }

   public List<Address> getMembers() {
      if (globalComponentRegistry == null) return null;
      Transport t = globalComponentRegistry.getComponent(Transport.class);
      return t == null ? null : t.getMembers();
   }
View Full Code Here

      return t == null ? null : t.getMembers();
   }

   public Address getAddress() {
      if (globalComponentRegistry == null) return null;
      Transport t = globalComponentRegistry.getComponent(Transport.class);
      return t == null ? null : t.getAddress();
   }
View Full Code Here

TOP

Related Classes of org.infinispan.remoting.transport.Transport

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.