public boolean addObserver(ConnectionObserver obs) {
    boolean rv = conn.addObserver(obs);
    if (rv) {
      for (MemcachedNode node : conn.getLocator().getAll()) {
        if (node.isActive()) {
          obs.connectionEstablished(node.getSocketAddress(), -1);
        }
      }
    }
    return rv;
  }
public boolean addObserver ( ConnectionObserver obs ) { boolean rv = conn . addObserver ( obs ) ; if ( rv ) { for ( MemcachedNode node : conn . getLocator ( ) . getAll ( ) ) { if ( node . isActive ( ) ) { obs . connectionEstablished ( node . getSocketAddress ( ) , - 1 ) ; } } } return rv ; }
Add a connection observer.

If connections are already established, your observer will be called with
the address and -1.

@param obs the ConnectionObserver you wish to add
@return true if the observer was added.