Package com.aerospike.client

Examples of com.aerospike.client.Host


          host = alternativeHost;
        }       
      }
     
      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


    try {
      InetAddress[] addresses = InetAddress.getAllByName(host.name);
      aliases = new Host[addresses.length];
     
      for (int i = 0; i < addresses.length; i++) {
        aliases[i] = new Host(addresses[i].getHostAddress(), host.port);
      }
    }
    catch (UnknownHostException uhe) {
      throw new AerospikeException.Connection("Invalid host: " + host);
    }

    Exception exception = null;
   
    for (int i = 0; i < aliases.length; i++) {
      Host alias = aliases[i];
     
      try {
        InetSocketAddress address = new InetSocketAddress(alias.name, alias.port);
        Connection conn = new Connection(address, cluster.getConnectionTimeout());
       
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);
        for (Node node : nodes) {
          Host host = node.getHost();
          if (! findSeed(host)) {
            seedsToAdd.add(host);
          }
        }
       
View Full Code Here

    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

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.