public void init() throws Exception { super.init(); TP transport=getTransport(); sends_can_block=transport instanceof TCP; // UDP and TCP_NIO2 won't block time_service=transport.getTimeService(); if(time_service == null) throw new IllegalStateException("time service from transport is null"); last_sync_sent=new ExpiryCache<>(sync_min_interval); // max bundle size (minus overhead) divided by <long size> times bits per long // Example: for 8000 missing messages, SeqnoList has a serialized size of 1012 bytes, for 64000 messages, the // serialized size is 8012 bytes. Therefore, for a serialized size of 64000 bytes, we can retransmit a max of // 8 * 64000 = 512'000 seqnos // see SeqnoListTest.testSerialization3() int estimated_max_msgs_in_xmit_req=(transport.getMaxBundleSize() -50) * Global.LONG_SIZE; int old_max_xmit_size=max_xmit_req_size; if(max_xmit_req_size <= 0) max_xmit_req_size=estimated_max_msgs_in_xmit_req; else max_xmit_req_size=Math.min(max_xmit_req_size, estimated_max_msgs_in_xmit_req); if(old_max_xmit_size != max_xmit_req_size) log.trace("%s: set max_xmit_req_size from %d to %d", local_addr, old_max_xmit_size, max_xmit_req_size); boolean regular_pool_enabled=(boolean)transport.getValue("thread_pool_enabled"); if(!regular_pool_enabled) log.info("the thread pool is disabled; %s could be removed (JGRP-2069)", getClass().getSimpleName()); }
public void init() throws Exception { timer=getTransport().getTimer(); if(timer == null) throw new Exception("timer not set"); time_service=getTransport().getTimeService(); if(time_service == null) log.warn("%s: time service is not available, using System.currentTimeMillis() instead", local_addr); else { if(time_service.interval() > timeout) { log.warn("%s: interval of time service (%d) is greater than timeout (%d), disabling time service", local_addr, time_service.interval(), timeout); use_time_service=false; } } if(interval > timeout) log.warn("interval (%d) is bigger than timeout (%d); this will lead to false suspicions", interval, timeout); suspected_mbrs.clear(); has_suspected_mbrs=false; }
public void init() throws Exception { if(interval >= timeout) throw new IllegalArgumentException("interval (" + interval + ") has to be less than timeout (" + timeout + ")"); super.init(); if(cmd != null) ping_command=new ExternalPingCommand(cmd); timer=getTransport().getTimer(); if(timer == null) throw new Exception("timer not set"); time_service=getTransport().getTimeService(); if(time_service == null) log.warn("%s: time service is not available, using System.currentTimeMillis() instead", local_addr); else { if(time_service.interval() > timeout) { log.warn("%s: interval of time service (%d) is greater than timeout (%d), disabling time service", local_addr, time_service.interval(), timeout); use_time_service=false; } } suspected_mbrs.clear(); has_suspected_mbrs=false; }
public void init() throws Exception { super.init(); TP transport=getTransport(); sends_can_block=transport instanceof TCP; // UDP and TCP_NIO2 won't block time_service=transport.getTimeService(); if(time_service == null) throw new IllegalStateException("time service from transport is null"); last_sync_sent=new ExpiryCache<>(sync_min_interval); // max bundle size (minus overhead) divided by <long size> times bits per long // Example: for 8000 missing messages, SeqnoList has a serialized size of 1012 bytes, for 64000 messages, the // serialized size is 8012 bytes. Therefore, for a serialized size of 64000 bytes, we can retransmit a max of // 8 * 64000 = 512'000 seqnos // see SeqnoListTest.testSerialization3() int estimated_max_msgs_in_xmit_req=(transport.getMaxBundleSize() -50) * Global.LONG_SIZE; int old_max_xmit_size=max_xmit_req_size; if(max_xmit_req_size <= 0) max_xmit_req_size=estimated_max_msgs_in_xmit_req; else max_xmit_req_size=Math.min(max_xmit_req_size, estimated_max_msgs_in_xmit_req); if(old_max_xmit_size != max_xmit_req_size) log.trace("%s: set max_xmit_req_size from %d to %d", local_addr, old_max_xmit_size, max_xmit_req_size); boolean regular_pool_enabled=(boolean)transport.getValue("thread_pool_enabled"); if(!regular_pool_enabled) log.info("the thread pool is disabled; %s could be removed (JGRP-2069)", getClass().getSimpleName()); }
public void init() throws Exception { if(interval >= timeout) throw new IllegalArgumentException("interval (" + interval + ") has to be less than timeout (" + timeout + ")"); super.init(); if(cmd != null) ping_command=new ExternalPingCommand(cmd); timer=getTransport().getTimer(); if(timer == null) throw new Exception("timer not set"); time_service=getTransport().getTimeService(); if(time_service == null) log.warn("%s: time service is not available, using System.currentTimeMillis() instead", local_addr); else { if(time_service.interval() > timeout) { log.warn("%s: interval of time service (%d) is greater than timeout (%d), disabling time service", local_addr, time_service.interval(), timeout); use_time_service=false; } } suspected_mbrs.clear(); has_suspected_mbrs=false; }
public void init() throws Exception { timer=getTransport().getTimer(); if(timer == null) throw new Exception("timer not set"); time_service=getTransport().getTimeService(); if(time_service == null) log.warn("%s: time service is not available, using System.currentTimeMillis() instead", local_addr); else { if(time_service.interval() > timeout) { log.warn("%s: interval of time service (%d) is greater than timeout (%d), disabling time service", local_addr, time_service.interval(), timeout); use_time_service=false; } } if(interval > timeout) log.warn("interval (%d) is bigger than timeout (%d); this will lead to false suspicions", interval, timeout); suspected_mbrs.clear(); has_suspected_mbrs=false; }