Examples of JGroupsTransport


Examples of org.infinispan.remoting.transport.jgroups.JGroupsTransport

   @Override
   public Channel getChannel()
   {
      if (this.cache == null) return null;
     
      JGroupsTransport transport = (JGroupsTransport) this.cache.getAdvancedCache().getRpcManager().getTransport();
     
      return transport.getChannel();
   }
View Full Code Here

Examples of org.infinispan.remoting.transport.jgroups.JGroupsTransport

      {
         SharedLocalYieldingClusterLockManager lockManager = this.lockManagers.get(clusterName);
        
         if (lockManager == null)
         {
            JGroupsTransport transport = (JGroupsTransport) cache.getAdvancedCache().getRpcManager().getTransport();
            Channel channel = transport.getChannel();
           
            CoreGroupCommunicationService gcs = new CoreGroupCommunicationService();
            gcs.setChannel(channel);
            gcs.setScopeId(SCOPE_ID);
           
View Full Code Here

Examples of org.infinispan.remoting.transport.jgroups.JGroupsTransport

         EmbeddedCacheManager cacheManager = cache.getCacheManager();

         if (cacheManager.getCoordinator() instanceof JGroupsAddress
            && cacheManager.getTransport() instanceof JGroupsTransport)
         {
            JGroupsTransport transport = (JGroupsTransport)cacheManager.getTransport();
            // Coordinator's address
            org.jgroups.Address jgAddress = ((JGroupsAddress)cacheManager.getCoordinator()).getJGroupsAddress();
            // if jgAddress is UUID address, not the physical one, then retrieve via channel
            if (!(jgAddress instanceof IpAddress))
            {
               // this is the only way of getting physical address.
               Channel channel = transport.getChannel();
               jgAddress = (org.jgroups.Address)channel.down(new Event(Event.GET_PHYSICAL_ADDRESS, jgAddress));
            }
            if (jgAddress instanceof IpAddress)
            {
               String address = ((IpAddress)jgAddress).getIpAddress().getHostAddress();
View Full Code Here

Examples of org.infinispan.remoting.transport.jgroups.JGroupsTransport

   public static GlobalConfigurationBuilder defaultClusteredBuilder() {
      GlobalConfigurationBuilder builder = new GlobalConfigurationBuilder();
      builder
            .transport()
               .transport(new JGroupsTransport())
            .asyncTransportExecutor()
               .addProperty("threadNamePrefix", "asyncTransportThread");

      return builder;
   }
View Full Code Here

Examples of org.infinispan.remoting.transport.jgroups.JGroupsTransport

   public static GlobalConfigurationBuilder defaultClusteredBuilder() {
      GlobalConfigurationBuilder builder = new GlobalConfigurationBuilder();
      builder
            .transport()
               .transport(new JGroupsTransport())
            .asyncTransportExecutor()
               .addProperty("threadNamePrefix", "asyncTransportThread");

      return builder;
   }
View Full Code Here

Examples of org.infinispan.remoting.transport.jgroups.JGroupsTransport

   @Override
   public Channel getChannel()
   {
      if (this.cache == null) return null;
     
      JGroupsTransport transport = (JGroupsTransport) this.cache.getAdvancedCache().getRpcManager().getTransport();
     
      return transport.getChannel();
   }
View Full Code Here

Examples of org.infinispan.remoting.transport.jgroups.JGroupsTransport

      {
         SharedLocalYieldingClusterLockManager lockManager = this.lockManagers.get(clusterName);
        
         if (lockManager == null)
         {
            JGroupsTransport transport = (JGroupsTransport) cache.getAdvancedCache().getRpcManager().getTransport();
            Channel channel = transport.getChannel();
           
            CoreGroupCommunicationService gcs = new CoreGroupCommunicationService();
            gcs.setChannel(channel);
            gcs.setScopeId(SCOPE_ID);
           
View Full Code Here

Examples of org.infinispan.remoting.transport.jgroups.JGroupsTransport

      }
      return values;
   }

   public static DISCARD getDiscardForCache(Cache<?, ?> c) throws Exception {
      JGroupsTransport jgt = (JGroupsTransport) TestingUtil.extractComponent(c, Transport.class);
      Channel ch = jgt.getChannel();
      ProtocolStack ps = ch.getProtocolStack();
      DISCARD discard = new DISCARD();
      ps.insertProtocol(discard, ProtocolStack.ABOVE, TP.class);
      return discard;
   }
View Full Code Here

Examples of org.infinispan.remoting.transport.jgroups.JGroupsTransport

    * @param out_delay_millis
    * @return a reference to the DELAY instance being used by the JGroups stack
    * @throws Exception
    */
   public static DELAY setDelayForCache(Cache<?, ?> cache, int in_delay_millis, int out_delay_millis) throws Exception {
      JGroupsTransport jgt = (JGroupsTransport) TestingUtil.extractComponent(cache, Transport.class);
      Channel ch = jgt.getChannel();
      ProtocolStack ps = ch.getProtocolStack();
      DELAY delay = new DELAY();
      delay.setInDelay(in_delay_millis);
      delay.setOutDelay(out_delay_millis);
      ps.insertProtocol(delay, ProtocolStack.ABOVE, TP.class);
View Full Code Here

Examples of org.infinispan.remoting.transport.jgroups.JGroupsTransport

         EmbeddedCacheManager cacheManager = cache.getCacheManager();

         if (cacheManager.getCoordinator() instanceof JGroupsAddress
            && cacheManager.getTransport() instanceof JGroupsTransport)
         {
            JGroupsTransport transport = (JGroupsTransport)cacheManager.getTransport();
            // Coordinator's address
            org.jgroups.Address jgAddress = ((JGroupsAddress)cacheManager.getCoordinator()).getJGroupsAddress();
            // if jgAddress is UUID address, not the physical one, then retrieve via channel
            if (!(jgAddress instanceof IpAddress))
            {
               // this is the only way of getting physical address.
               Channel channel = transport.getChannel();
               jgAddress = (org.jgroups.Address)channel.down(new Event(Event.GET_PHYSICAL_ADDRESS, jgAddress));
            }
            if (jgAddress instanceof IpAddress)
            {
               String address = ((IpAddress)jgAddress).getIpAddress().getHostAddress();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.