public Map<InetAddress, UUID> getEndpointToHostIdMapForReading()
    {
        lock.readLock().lock();
        try
        {
            Map<InetAddress, UUID> readMap = new HashMap<InetAddress, UUID>();
            readMap.putAll(endpointToHostIdMap);
            return readMap;
        }
        finally
        {
            lock.readLock().unlock();
        }
    }
public Map < InetAddress , UUID > getEndpointToHostIdMapForReading ( ) { lock . readLock ( ) . lock ( ) ; try { Map < InetAddress , UUID > readMap = new HashMap < InetAddress , UUID > ( ) ; readMap . putAll ( endpointToHostIdMap ) ; return readMap ; } finally { lock . readLock ( ) . unlock ( ) ; } }
@return a copy of the endpoint-to-id map for read-only operations