public class RouterStubManager extends Object implements Runnable, RouterStub.CloseListener
Modifier and Type | Class and Description |
---|---|
static interface |
RouterStubManager.Consumer
Interface to iterate through stubs.
|
protected static class |
RouterStubManager.Target |
Modifier and Type | Field and Description |
---|---|
protected String |
cluster_name |
protected ConcurrentMap<RouterStub,Future<?>> |
futures |
protected long |
interval |
protected Address |
local_addr |
protected Log |
log |
protected String |
logical_name |
protected Protocol |
owner |
protected PhysicalAddress |
phys_addr |
protected Set<RouterStubManager.Target> |
reconnect_list |
protected Future<?> |
reconnector_task |
protected List<RouterStub> |
stubs |
protected TimeScheduler |
timer |
protected boolean |
use_nio |
Constructor and Description |
---|
RouterStubManager(Protocol owner,
String cluster_name,
Address local_addr,
String logical_name,
PhysicalAddress phys_addr,
long interval) |
protected final ConcurrentMap<RouterStub,Future<?>> futures
protected volatile List<RouterStub> stubs
protected volatile Set<RouterStubManager.Target> reconnect_list
protected final Protocol owner
protected final TimeScheduler timer
protected final String cluster_name
protected final Address local_addr
protected final String logical_name
protected final PhysicalAddress phys_addr
protected final long interval
protected boolean use_nio
protected Future<?> reconnector_task
protected final Log log
public RouterStubManager(Protocol owner, String cluster_name, Address local_addr, String logical_name, PhysicalAddress phys_addr, long interval)
public static RouterStubManager emptyGossipClientStubManager(Protocol p)
public RouterStubManager useNio(boolean flag)
public void forEach(RouterStubManager.Consumer action)
action
- public void forAny(RouterStubManager.Consumer action)
action
- public RouterStub createAndRegisterStub(IpAddress local, IpAddress router_addr)
public RouterStub unregisterStub(IpAddress router_addr)
public void connectStubs()
public void disconnectStubs()
public void destroyStubs()
public String printStubs()
public String printReconnectList()
public String print()
public void closed(RouterStub stub)
closed
in interface RouterStub.CloseListener
protected boolean reconnect(RouterStubManager.Target target)
protected void moveStubToReconnects(RouterStub stub)
protected boolean add(RouterStub stub)
protected boolean add(RouterStubManager.Target target)
protected boolean remove(RouterStub stub)
protected boolean remove(RouterStubManager.Target target)
protected void apply(RouterStub stub, RouterStubManager.Consumer action)
protected RouterStub find(IpAddress router_addr)
protected void startReconnector()
protected void stopReconnector()
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.