code: public void connect(String cluster_name, Address target, long timeout) throws Exception {
          ch.connect(cluster_name, target, timeout);
      }
docs: Connects this channel to a group and gets a state from a specified state provider.
  <p/>
  
  This method essentially invokes
  <code>connect<code> and <code>getState<code> methods successively.
  If FLUSH protocol is in channel's stack definition only one flush is executed for both connecting and
  fetching state rather than two flushes if we invoke <code>connect<code> and <code>getState<code> in succession.
  
  If the channel is closed an exception will be thrown.
  
  
  @param cluster_name  the cluster name to connect to. Cannot be null.
  @param target the state provider. If null state will be fetched from coordinator, unless this channel is coordinator.
  @param timeout the timeout for state transfer.
  
  @exception Exception Connecting to the cluster or state transfer was not successful
  @exception IllegalStateException The channel is closed and therefore cannot be used