public void start() throws Exception { timer=getTransport().getTimer(); if(timer == null) throw new Exception("timer is null"); if(max_retransmit_time > 0) cache=new AgeOutCache<>(timer, max_retransmit_time, this); running=true; startRetransmitTask(); }
protected SenderEntry getSenderEntry(Address dst) { SenderEntry entry=send_table.get(dst); if(entry == null || entry.state() == State.CLOSED) { if(entry != null) send_table.remove(dst, entry); entry=new SenderEntry(getNewConnectionId()); SenderEntry existing=send_table.putIfAbsent(dst, entry); if(existing != null) entry=existing; else { log.trace("%s: created sender window for %s (conn-id=%s)", local_addr, dst, entry.connId()); if(cache != null && !members.contains(dst)) cache.add(dst); } } if(entry.state() == State.CLOSING) entry.state(State.OPEN); return entry; }
non_members.removeAll(new_members); if(cache != null) cache.removeAll(new_members);
@Property(description="Max number of milliseconds we try to retransmit a message to any given member. After that, " + "the connection is removed. Any new connection to that member will start with seqno #1 again. 0 disables this") public void setMaxRetransmitTime(long max_retransmit_time) { this.max_retransmit_time=max_retransmit_time; if(cache != null && max_retransmit_time > 0) cache.setTimeout(max_retransmit_time); }
@ManagedAttribute public int getAgeOutCacheSize() { return cache != null? cache.size() : 0; }
@ManagedOperation public String printAgeOutCache() { return cache != null? cache.toString() : "n/a"; }
@Property(description="Max number of milliseconds we try to retransmit a message to any given member. After that, " + "the connection is removed. Any new connection to that member will start with seqno #1 again. 0 disables this") public void setMaxRetransmitTime(long max_retransmit_time) { this.max_retransmit_time=max_retransmit_time; if(cache != null && max_retransmit_time > 0) cache.setTimeout(max_retransmit_time); }
@ManagedAttribute public int getAgeOutCacheSize() { return cache != null? cache.size() : 0; }
@ManagedOperation public String printAgeOutCache() { return cache != null? cache.toString() : "n/a"; }
public void start() throws Exception { timer=getTransport().getTimer(); if(timer == null) throw new Exception("timer is null"); if(max_retransmit_time > 0) cache=new AgeOutCache<>(timer, max_retransmit_time, this); running=true; startRetransmitTask(); }
protected SenderEntry getSenderEntry(Address dst) { SenderEntry entry=send_table.get(dst); if(entry == null || entry.state() == State.CLOSED) { if(entry != null) send_table.remove(dst, entry); entry=new SenderEntry(getNewConnectionId()); SenderEntry existing=send_table.putIfAbsent(dst, entry); if(existing != null) entry=existing; else { log.trace("%s: created sender window for %s (conn-id=%s)", local_addr, dst, entry.connId()); if(cache != null && !members.contains(dst)) cache.add(dst); } } if(entry.state() == State.CLOSING) entry.state(State.OPEN); return entry; }
non_members.removeAll(new_members); if(cache != null) cache.removeAll(new_members);