Re: [jgroups-users] upgrading to 3.6.8

Questions/problems related to using JGroups <[email protected]>
Newsgroups gmane.comp.java.javagroups.general
Message-ID <[email protected]>
NP, the new code in 3.6 is shown below. Unfortunately, you can't create 
TCPPING directly after TCP with the initial_hosts list, as this will get 
overwritten with an empty list. So you have to set initial_hosts in 
TCPPING _after_ channel creation. Not a big deal I hope!



       TCPPING tcpping=new TCPPING();
         JChannel ch=new JChannel(
           new TCP()
             .setValue("oob_thread_pool_keep_alive_time", 5000)
             .setValue("timer_keep_alive_time", 3000)
             .setValue("bind_addr", InetAddress.getByName("127.0.0.1"))
             .setValue("bind_port", 7800)
             .setValue("thread_pool_min_threads", 1)
             .setValue("thread_pool_keep_alive_time", 5000)
             .setValue("send_buf_size", 640000)
             .setValue("oob_thread_pool_queue_max_size", 100)
             .setValue("oob_thread_pool_max_threads", 8)
             .setValue("thread_pool_queue_enabled", false)
             .setValue("sock_conn_timeout", 300)
             .setValue("oob_thread_pool_min_threads", 1)
             .setValue("loopback", false)
             .setValue("oob_thread_pool_queue_enabled", false)
             .setValue("max_bundle_timeout", 30)
             .setValue("thread_pool_queue_max_size", 100)
             .setValue("recv_buf_size", 5000000),
           tcpping,
           new MERGE3()
             .setValue("min_interval", 10000)
             .setValue("max_interval", 30000),
           new FD_SOCK(),
           new FD_ALL2()
             .setValue("timeout", 30 * 1000L),
         new VERIFY_SUSPECT()
           .setValue("timeout", 1500),
           new BARRIER(),
           new NAKACK2()
             .setValue("use_mcast_xmit", false),
           new UNICAST3(),
           new STABLE()
             .setValue("desired_avg_gossip", 50000)
             .setValue("max_bytes", 4000000)
             .setValue("stability_delay", 1000),
         new GMS()
           .setValue("join_timeout", 3000),
           new MFC()
             .setValue("max_credits", 2000000)
             .setValue("min_credits", 800000),
           new FRAG2(),
           new STATE_TRANSFER()
         );

         ch.setReceiver(new ReceiverAdapter() {
             public void viewAccepted(View view) {
                 System.out.println("view = " + view);
             }
         });

         List<PhysicalAddress> initial_hosts=new ArrayList<>();
         initial_hosts.addAll(create());
         tcpping.setInitialHosts(initial_hosts);

         ch.connect("demo");

On 31/03/16 18:48, Questions/problems related to using JGroups wrote:
> On Thu, Mar 31, 2016 at 12:42 PM, Questions/problems related to using
> JGroups <[email protected]
> <mailto:[email protected]>> wrote:
>
>     This is a bug, I'm changing this as we speak on 3.6 and master. There's
>     a hacky workaround below, which uses MPING to create the stack but then
>     replaces MPING with TCPPING before connecting to the cluster.
>
>
> Thanks for the quick attention!
>
> Cheers,
> Bobby
>
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
>
>
>
> _______________________________________________
> javagroups-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/javagroups-users
>

-- 
Bela Ban, JGroups lead (http://www.jgroups.org)


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.