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 { 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()); }