org.jgroups.blocks
Class AbstractConnectionMap<V extends Connection>
java.lang.Object
org.jgroups.blocks.AbstractConnectionMap<V>
- All Implemented Interfaces:
- ConnectionMap<V>
- Direct Known Subclasses:
- TCPConnectionMap.Mapper
public abstract class AbstractConnectionMap<V extends Connection>
- extends java.lang.Object
- implements ConnectionMap<V>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
conn_listeners
protected final java.util.List<AbstractConnectionMap.ConnectionMapListener<V extends Connection>> conn_listeners
conns
protected final java.util.Map<Address,V extends Connection> conns
lock
protected final java.util.concurrent.locks.Lock lock
sock_creation_lock
protected final java.util.concurrent.locks.Lock sock_creation_lock
factory
protected final ThreadFactory factory
reaperInterval
protected final long reaperInterval
reaper
protected final org.jgroups.blocks.AbstractConnectionMap.Reaper reaper
log
protected final Log log
AbstractConnectionMap
public AbstractConnectionMap(ThreadFactory factory)
AbstractConnectionMap
public AbstractConnectionMap(ThreadFactory factory,
long reaperInterval)
getLock
public java.util.concurrent.locks.Lock getLock()
hasOpenConnection
public boolean hasOpenConnection(Address address)
hasConnection
public boolean hasConnection(Address address)
addConnection
public void addConnection(Address address,
V conn)
addConnectionMapListener
public void addConnectionMapListener(AbstractConnectionMap.ConnectionMapListener<V> cml)
getNumConnections
public int getNumConnections()
printConnections
public java.lang.String printConnections()
getThreadFactory
public ThreadFactory getThreadFactory()
removeConnection
public void removeConnection(Address address)
removeConnectionMapListener
public void removeConnectionMapListener(AbstractConnectionMap.ConnectionMapListener<V> cml)
retainAll
public void retainAll(java.util.Collection<Address> current_mbrs)
- Removes all connections which are not in current_mbrs
- Parameters:
current_mbrs
-
start
public void start()
throws java.lang.Exception
- Throws:
java.lang.Exception
stop
public void stop()
clear
protected void clear()
notifyConnectionClosed
protected void notifyConnectionClosed(Address address)
notifyConnectionOpened
protected void notifyConnectionOpened(Address address,
V conn)
Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.