KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jgroups > protocols > TCP1_4


1 package org.jgroups.protocols;
2
3 import org.jgroups.blocks.ConnectionTable1_4;
4
5 import java.net.InetAddress JavaDoc;
6
7 public class TCP1_4 extends TCP
8 {
9
10     /*
11      * (non-Javadoc)
12      *
13      * @see org.jgroups.protocols.TCP#initConnectionTable1_4(long, long)
14      */

15     protected ConnectionTable1_4 getConnectionTable1_4(long ri, long cet,
16             InetAddress JavaDoc b_addr, InetAddress JavaDoc bc_addr, int s_port, int e_port) throws Exception JavaDoc {
17         ConnectionTable1_4 ct = null;
18         if (ri == 0 && cet == 0) {
19             ct = new ConnectionTable1_4(this, b_addr, bc_addr, s_port, e_port);
20         } else {
21             if (ri == 0) {
22                 ri = 5000;
23                 if(log.isWarnEnabled()) log.warn("reaper_interval was 0, set it to "
24                         + ri);
25             }
26             if (cet == 0) {
27                 cet = 1000 * 60 * 5;
28                 if(log.isWarnEnabled()) log.warn("conn_expire_time was 0, set it to "
29                         + cet);
30             }
31             ct = new ConnectionTable1_4(this, b_addr, bc_addr, s_port, e_port, ri, cet);
32         }
33         return ct;
34     }
35     
36     public String JavaDoc getName() {
37         return "TCP1_4";
38     }
39 }
Popular Tags