Package org.infinispan.remoting.transport

Examples of org.infinispan.remoting.transport.Transport


            distributedSyncTimeout, transport, nodeName, TypedProperties.toTypedProperties(properties),
            transportThreadPool.create(), remoteCommandThreadPool.create(), totalOrderThreadPool.create());
   }

   public TransportConfigurationBuilder defaultTransport() {
      Transport transport = Util.getInstance(DEFAULT_TRANSPORT, this.getGlobalConfig().getClassLoader());
      transport(transport);
      return this;
   }
View Full Code Here


      threadFactories.put(name, threadFactory);
      ParseUtils.requireNoContent(reader);
   }

   private void parseJGroups(XMLExtendedStreamReader reader, ConfigurationBuilderHolder holder) throws XMLStreamException {
      Transport transport = null;
      for (int i = 0; i < reader.getAttributeCount(); i++) {
         ParseUtils.requireNoNamespaceAttribute(reader, i);
         String value = replaceProperties(reader.getAttributeValue(i));
         Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
View Full Code Here

      isClustered = SecurityActions.getCacheConfiguration(cache.getAdvancedCache()).clustering().cacheMode().isClustered();

      if (isClustered) {
         // Use component registry to avoid keeping an instance ref simply used on start
         ComponentRegistry componentRegistry = SecurityActions.getCacheComponentRegistry(cache.getAdvancedCache());
         Transport transport = componentRegistry
               .getGlobalComponentRegistry().getComponent(Transport.class);
         calculateRank(transport.getAddress(), transport.getMembers(), transport.getViewId());
      }
   }
View Full Code Here

   /**
    * {@inheritDoc}
    */
   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

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

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

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

         }
      });
   }

   private boolean isMaster(Cache<?, ?> cm) {
      Transport transport = cm.getAdvancedCache().getRpcManager().getTransport();
      return transport.getCoordinator().equals(transport.getAddress());
   }
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, false, false);
            }
            // 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

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.