Package org.jgroups

Examples of org.jgroups.Channel


      RuntimeConfig rtcfg = cfg.getRuntimeConfig();

      // Only inject if there isn't already a channel or factory
      if (rtcfg.getMuxChannelFactory() == null && rtcfg.getChannel() == null)
      {
         Channel ch;
         try
         {
            ch = multiplexerService.createMultiplexerChannel(cfg.getMultiplexerStack(), cfg.getClusterName());
         }
         catch (Exception e)
View Full Code Here


    * @param members
    * @return
    */
   private List<Address> checkBuddyStatus(List<Address> members)
   {
      Channel ch = configuration.getRuntimeConfig().getChannel();
      View currentView = ch.getView();
      List<Address> deadBuddies = new LinkedList<Address>();
      for (Address a : members) if (!currentView.containsMember(a)) deadBuddies.add(a);
      return deadBuddies;
   }
View Full Code Here

            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();
               RSyncJob rSyncJob =
View Full Code Here

      RuntimeConfig rtcfg = cfg.getRuntimeConfig();

      // Only inject if there isn't already a channel or factory
      if (rtcfg.getMuxChannelFactory() == null && rtcfg.getChannel() == null)
      {
         Channel ch;
         try
         {
            ch = multiplexerService.createMultiplexerChannel(cfg.getMultiplexerStack(), cfg.getClusterName());
         }
         catch (Exception e)
View Full Code Here

        this.channelName = channelName;
    }

    public TransportChannel create(WireFormat wireFormat, URI remoteLocation) throws JMSException {
        try {
            Channel channel = createChannel(remoteLocation);
            channel.setOpt(Channel.AUTO_RECONNECT, Boolean.TRUE);
            channel.connect(channelName);
            return populateProperties(new JGroupsTransportChannel(wireFormat, channel, null), remoteLocation);
        }
        catch (ChannelException e) {
            throw JMSExceptionHelper.newJMSException("Failed to construct JGroups Channel: " + e, e);
        }
View Full Code Here

    * @param members
    * @return
    */
   private List<Address> checkBuddyStatus(List<Address> members)
   {
      Channel ch = configuration.getRuntimeConfig().getChannel();
      View currentView = ch.getView();
      List<Address> deadBuddies = new LinkedList<Address>();
      for (Address a : members) if (!currentView.containsMember(a)) deadBuddies.add(a);
      return deadBuddies;
   }
View Full Code Here

      RuntimeConfig rtcfg = cfg.getRuntimeConfig();

      // Only inject if there isn't already a channel or factory
      if (rtcfg.getMuxChannelFactory() == null && rtcfg.getChannel() == null)
      {
         Channel ch;
         try
         {
            ch = multiplexerService.createMultiplexerChannel(cfg.getMultiplexerStack(), cfg.getClusterName());
         }
         catch (Exception e)
View Full Code Here

   public void testChannelInjectionPreference() throws Exception
   {
      muxHelper.configureCacheForMux(cache);

      Channel channel = new JChannel(JChannel.DEFAULT_PROTOCOL_STACK);

      RuntimeConfig rtcfg = cache.getConfiguration().getRuntimeConfig();
      rtcfg.setChannel(channel);

      // Start shouldn't fail and we shouldn't be using mulitplexer
View Full Code Here

         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

      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

TOP

Related Classes of org.jgroups.Channel

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.