Package org.infinispan.remoting.transport

Examples of org.infinispan.remoting.transport.Transport


   }

   @ManagedAttribute(description = "Size of the cluster in number of nodes")
   @Metric(displayName = "Cluster size", displayType = DisplayType.SUMMARY)
   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

   public void removeCache(String cacheName) {
      ComponentRegistry cacheComponentRegistry = globalComponentRegistry.getNamedComponentRegistry(cacheName);
      if (cacheComponentRegistry != null) {
         RemoveCacheCommand cmd = new RemoveCacheCommand(cacheName, this, globalComponentRegistry,
               cacheComponentRegistry.getComponent(CacheLoaderManager.class));
         Transport transport = getTransport();
         try {
            if (transport != null) {
               Configuration c = getConfiguration(cacheName);
               // Use sync replication timeout
               transport.invokeRemotely(null, cmd, ResponseMode.SYNCHRONOUS, c.clustering().sync().replTimeout(), false, null);
            }
            // Once sent to the cluster, remove the local cache
            cmd.perform(null);
         } catch (Throwable t) {
            throw new CacheException("Error removing cache", t);
View Full Code Here

   /**
    * {@inheritDoc}
    */
   @Override
   public List<Address> getMembers() {
      Transport t = getTransport();
      return t == null ? null : t.getMembers();
   }
View Full Code Here

   /**
    * {@inheritDoc}
    */
   @Override
   public Address getAddress() {
      Transport t = getTransport();
      return t == null ? null : t.getAddress();
   }
View Full Code Here

   /**
    * {@inheritDoc}
    */
   @Override
   public Address getCoordinator() {
      Transport t = getTransport();
      return t == null ? null : t.getCoordinator();
   }
View Full Code Here

   /**
    * {@inheritDoc}
    */
   @Override
   public boolean isCoordinator() {
      Transport t = getTransport();
      return t != null && t.isCoordinator();
   }
View Full Code Here

   @ManagedAttribute(description = "The physical network addresses associated with this instance")
   @Metric(displayName = "Physical network addresses", dataType = DataType.TRAIT, displayType = DisplayType.SUMMARY)
   @SuppressWarnings("unused")
   public String getPhysicalAddresses() {
      Transport t = getTransport();
      if (t == null) return "local";
      List<Address> address = t.getPhysicalAddresses();
      return address == null ? "local" : address.toString();
   }
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.