Ejemplo n.º 1
0
 /// <summary>
 ///  Adds a contact point. Contact points are addresses of Cassandra nodes that
 ///  the driver uses to discover the cluster topology. Only one contact point is
 ///  required (the driver will retrieve the address of the other nodes
 ///  automatically), but it is usually a good idea to provide more than one
 ///  contact point, as if that unique contact point is not available, the driver
 ///  won't be able to initialize itself correctly.
 /// </summary>
 /// <remarks>
 ///  However, this can be useful if the Cassandra nodes are behind a router and
 ///  are not accessed directly. Note that if you are in this situation
 ///  (Cassandra nodes are behind a router, not directly accessible), you almost
 ///  surely want to provide a specific <c>IAddressTranslator</c>
 ///  (through <link>Builder.WithAddressTranslater</link>) to translate actual
 ///  Cassandra node addresses to the addresses the driver should use, otherwise
 ///  the driver will not be able to auto-detect new nodes (and will generally not
 ///  function optimally).
 /// </remarks>
 /// <param name="address">the address of the node to connect to</param>
 /// <returns>this Builder</returns>
 public Builder AddContactPoint(string address)
 {
     AddContactPoints(Utils.ResolveHostByName(address));
     return(this);
 }
Ejemplo n.º 2
0
 /// <summary>
 ///  Adds a contact point. Contact points are addresses of Cassandra nodes that
 ///  the driver uses to discover the cluster topology. Only one contact point is
 ///  required (the driver will retrieve the address of the other nodes
 ///  automatically), but it is usually a good idea to provide more than one
 ///  contact point, as if that unique contact point is not available, the driver
 ///  won't be able to initialize itself correctly.'
 /// </summary>
 /// <param name="address"> the address of the node to connect to </param>
 ///
 /// <returns>this Builder </returns>
 public Builder AddContactPoint(string address)
 {
     this._addresses.AddRange(Utils.ResolveHostByName(address));
     return(this);
 }