Package com.aerospike.client

Examples of com.aerospike.client.Host


    for (String friend : friendNames) {
      String friendInfo[] = friend.split(":");
      String host = friendInfo[0];
      int port = Integer.parseInt(friendInfo[1]);
      Host alias = new Host(host, port);
      Node node = cluster.findAlias(alias);
     
      if (node != null) {
        node.referenceCount++;
      }
View Full Code Here


      InetAddress[] addresses = InetAddress.getAllByName(host.name);
      int count = 0;
      aliases = new Host[addresses.length];
     
      for (InetAddress address : addresses) {
        aliases[count++] = new Host(address.getHostAddress(), host.port);
      }
    }
    catch (UnknownHostException uhe) {
      throw new AerospikeException.Connection("Invalid host: " + host);
    }
View Full Code Here

        }
       
        // Add other nodes as seeds, if they don't already exist.
        ArrayList<Host> seedsToAdd = new ArrayList<Host>(nodes.length + 1);
        for (Node node : nodes) {
          Host host = node.getHost();
          if (! findSeed(host)) {
            seedsToAdd.add(host);
          }
        }
       
View Full Code Here

   * @param hostname        host name
   * @param port          host port
   * @throws AerospikeException  if host connection fails
   */
  public AsyncClient(String hostname, int port) throws AerospikeException {
    this(new AsyncClientPolicy(), new Host(hostname, port));
  }
View Full Code Here

   * @param hostname        host name
   * @param port          host port
   * @throws AerospikeException  if host connection fails
   */
  public AsyncClient(AsyncClientPolicy policy, String hostname, int port) throws AerospikeException {
    this(policy, new Host(hostname, port))
  }
View Full Code Here

        }
       
        // Add other nodes as seeds, if they don't already exist.
        ArrayList<Host> seedsToAdd = new ArrayList<Host>(nodes.length + 1);
        for (Node node : nodes) {
          Host host = node.getHost();
          if (! findSeed(host)) {
            seedsToAdd.add(host);
          }
        }
       
View Full Code Here

        }
       
        // Add other nodes as seeds, if they don't already exist.
        ArrayList<Host> seedsToAdd = new ArrayList<Host>(nodes.length);
        for (Node node : nodes) {
          Host host = node.getHost();
          if (! findSeed(host)) {
            seedsToAdd.add(host);
          }
        }
       
View Full Code Here

   * @param hostname        host name
   * @param port          host port
   * @throws AerospikeException  if host connection fails
   */
  public AsyncClient(String hostname, int port) throws AerospikeException {
    this(new AsyncClientPolicy(), new Host(hostname, port));
  }
View Full Code Here

   * @param hostname        host name
   * @param port          host port
   * @throws AerospikeException  if host connection fails
   */
  public AsyncClient(AsyncClientPolicy policy, String hostname, int port) throws AerospikeException {
    this(policy, new Host(hostname, port))
  }
View Full Code Here

        }
       
        // Add other nodes as seeds, if they don't already exist.
        ArrayList<Host> seedsToAdd = new ArrayList<Host>(nodes.length);
        for (Node node : nodes) {
          Host host = node.getHost();
          if (! findSeed(host)) {
            seedsToAdd.add(host);
          }
        }
       
View Full Code Here

TOP

Related Classes of com.aerospike.client.Host

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.