protected RawMemcacheClient connectRaw(boolean binary){
  List<HostAndPort> addresses=this.addresses;
  RawMemcacheClient client;
  if (srvRecord != null) {
    if (addresses != null) {
      throw new IllegalStateException("You may not specify both srvRecord and addresses");
    }
    client=createSRVClient(binary);
  }
 else {
    if (addresses == null) {
      addresses=ImmutableList.of(HostAndPort.fromParts(DEFAULT_HOSTNAME,DEFAULT_PORT));
    }
    final List<RawMemcacheClient> clients=createClients(addresses,binary);
    if (addresses.size() > 1) {
      checkState(clients.size() == addresses.size());
      final List<AddressAndClient> aac=Lists.newArrayListWithCapacity(clients.size());
      for (int i=0; i < clients.size(); i++) {
        final HostAndPort address=addresses.get(i);
        aac.add(new AddressAndClient(address,clients.get(i)));
      }
      client=new KetamaMemcacheClient(aac);
    }
 else {
      client=clients.get(0);
    }
  }
  if (retry) {
    return new RetryingClient(client);
  }
  return client;
}

protected RawMemcacheClient connectRaw ( boolean binary ) { List < HostAndPort > addresses = this . addresses ; RawMemcacheClient client ; if ( srvRecord != null ) { if ( addresses != null ) { throw new IllegalStateException ( "You may not specify both srvRecord and addresses" ) ; } client = createSRVClient ( binary ) ; } else { if ( addresses == null ) { addresses = ImmutableList . of ( HostAndPort . fromParts ( DEFAULT_HOSTNAME , DEFAULT_PORT ) ) ; } final List < RawMemcacheClient > clients = createClients ( addresses , binary ) ; if ( addresses . size ( ) > 1 ) { checkState ( clients . size ( ) == addresses . size ( ) ) ; final List < AddressAndClient > aac = Lists . newArrayListWithCapacity ( clients . size ( ) ) ; for ( int i = 0 ; i < clients . size ( ) ; i ++ ) { final HostAndPort address = addresses . get ( i ) ; aac . add ( new AddressAndClient ( address , clients . get ( i ) ) ) ; } client = new KetamaMemcacheClient ( aac ) ; } else { client = clients . get ( 0 ) ; } } if ( retry ) { return new RetryingClient ( client ) ; } return client ; }
connect a raw memcached client without any protocol specific methods . this should rarely be needed .
