public abstract class AbstractConnectionMap<V extends Connection> extends Object implements ConnectionMap<V>
Modifier and Type | Class and Description |
---|---|
static interface |
AbstractConnectionMap.ConnectionMapListener<V> |
Modifier and Type | Field and Description |
---|---|
protected List<AbstractConnectionMap.ConnectionMapListener<V>> |
conn_listeners |
protected Map<Address,V> |
conns |
protected ThreadFactory |
factory |
protected Lock |
lock |
protected Log |
log |
protected org.jgroups.blocks.AbstractConnectionMap.Reaper |
reaper |
protected long |
reaperInterval |
Constructor and Description |
---|
AbstractConnectionMap(ThreadFactory factory) |
AbstractConnectionMap(ThreadFactory factory,
long reaperInterval) |
Modifier and Type | Method and Description |
---|---|
void |
addConnection(Address address,
V conn) |
void |
addConnectionMapListener(AbstractConnectionMap.ConnectionMapListener<V> cml) |
protected void |
clear() |
Lock |
getLock() |
int |
getNumConnections() |
ThreadFactory |
getThreadFactory() |
boolean |
hasConnection(Address address) |
boolean |
hasOpenConnection(Address address) |
protected void |
notifyConnectionClosed(Address address) |
protected void |
notifyConnectionOpened(Address address,
V conn) |
String |
printConnections() |
void |
removeConnection(Address address) |
void |
removeConnectionMapListener(AbstractConnectionMap.ConnectionMapListener<V> cml) |
void |
retainAll(Collection<Address> current_mbrs)
Removes all connections which are not in current_mbrs
|
void |
start() |
void |
stop() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConnection
protected final List<AbstractConnectionMap.ConnectionMapListener<V extends Connection>> conn_listeners
protected final Map<Address,V extends Connection> conns
protected final Lock lock
protected final ThreadFactory factory
protected final long reaperInterval
protected final org.jgroups.blocks.AbstractConnectionMap.Reaper reaper
protected final Log log
public AbstractConnectionMap(ThreadFactory factory)
public AbstractConnectionMap(ThreadFactory factory, long reaperInterval)
public Lock getLock()
public boolean hasOpenConnection(Address address)
public boolean hasConnection(Address address)
public void addConnectionMapListener(AbstractConnectionMap.ConnectionMapListener<V> cml)
public int getNumConnections()
public String printConnections()
public ThreadFactory getThreadFactory()
public void removeConnection(Address address)
public void removeConnectionMapListener(AbstractConnectionMap.ConnectionMapListener<V> cml)
public void retainAll(Collection<Address> current_mbrs)
current_mbrs
- public void stop()
protected void clear()
protected void notifyConnectionClosed(Address address)
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.