Examples of Host


Examples of com.datastax.driver.core.Host

                    List<Host> l = perDcSuspectedHosts.get(localDc);
                    localSuspected = l == null ? Collections.<Host>emptySet().iterator() : l.iterator();
                }

                while (localSuspected.hasNext()) {
                    Host h = localSuspected.next();
                    waitOnReconnection(h);
                    if (h.isUp())
                        return h;
                }

                ConsistencyLevel cl = statement.getConsistencyLevel() == null
                                    ? configuration.getQueryOptions().getConsistencyLevel()
                                    : statement.getConsistencyLevel();

                if (dontHopForLocalCL && cl.isDCLocal())
                    return endOfData();

                if (remoteDcs == null) {
                    Set<String> copy = new HashSet<String>(perDcLiveHosts.keySet());
                    copy.remove(localDc);
                    remoteDcs = copy.iterator();
                }

                while (true) {
                    if (currentDcHosts != null && currentDcRemaining > 0) {
                        currentDcRemaining--;
                        int c = idx++ % currentDcHosts.size();
                        if (c < 0) {
                            c += currentDcHosts.size();
                        }
                        return currentDcHosts.get(c);
                    }

                    if (currentDcSuspected != null) {
                        while (currentDcSuspected.hasNext()) {
                            Host h = currentDcSuspected.next();
                            waitOnReconnection(h);
                            if (h.isUp())
                                return h;
                        }
                    }

                    if (!remoteDcs.hasNext())
View Full Code Here

Examples of com.datastax.driver.core.Host

                    if (suspected == null)
                        suspected = suspectedHosts.iterator();

                    while (suspected.hasNext()) {
                        Host h = suspected.next();
                        waitOnReconnection(h);
                        if (h.isUp())
                            return h;
                    }
                    return endOfData();
                }
View Full Code Here

Examples of com.dotmarketing.beans.Host

        //Getting the theme path
        String themePath;
        if ( themeFolder.getHostId().equals( hostId ) ) {
            themePath = Template.THEMES_PATH + themeFolder.getName() + "/";
        } else {
            Host themeHost = APILocator.getHostAPI().find( themeFolder.getHostId(), APILocator.getUserAPI().getSystemUser(), false );
            themePath = "//" + themeHost.getHostname() + Template.THEMES_PATH + themeFolder.getName() + "/";
        }

        //Getting the template.vtl file path
        String themeTemplatePath;
        if ( UtilMethods.isSet( themeTemplate ) && InodeUtils.isSet( themeTemplate.getInode() ) ) {
View Full Code Here

Examples of com.ettrema.httpclient.Host

   */
  //@Test
  public void test_Download_Update_OverHTTP() throws FileNotFoundException, IOException, HttpException, Exception {
    // Get metadata from http server
    System.out.println("--------------------- test3 -----------------------");
    Host host = new Host("localhost", "webdav", 8080, "me", "pwd", null, null);
    final File fRemoteMeta = File.createTempFile("milton-zsync-remotemeta", null);
    String url = host.getHref(Path.path("/source.txt/.zsync"));
    host.doGet(url, new StreamReceiver() {

      @Override
      public void receive(InputStream in) throws IOException {
        FileOutputStream fout = new FileOutputStream(fRemoteMeta);
        StreamUtils.readTo(in, fout, true, true);
      }
    }, null);
    System.out.println("meta file: " + fRemoteMeta.getAbsolutePath());
    // Now build local file
    com.ettrema.httpclient.File remoteFile = (com.ettrema.httpclient.File) host.find("/source.txt");
    Assert.assertNotNull(remoteFile);
    HttpRangeLoader rangeLoader = new HttpRangeLoader(remoteFile);

    System.out.println("local: " + fLocal.getAbsolutePath());
    fileMaker.make(fLocal, fRemoteMeta, rangeLoader);
View Full Code Here

Examples of com.netflix.astyanax.connectionpool.Host

      boolean b = true;
      logger.info("Strategy: " + METASTRATEGY.getValue() + " RF: "
          + METARF.getValue());
      try {
        b = keyspace.getConnectionPool().hasHost(
            new Host("localhost:9160", 9160));
      } catch (ConnectionException ex) {

      }
      if (b) {
        keyspace.createKeyspace(ImmutableMap
View Full Code Here

Examples of com.rupertjones.globalcron.common.domain.Host

public class HostDAOTest extends AbstractSpringTest {

    @Test
    public void test_create() {
        HostBuilder builder = new HostBuilder();
        Host host = builder.build();

        hostDAO.upsert(host);

        Host result = hostDAO.findByHostName("hostname");

        assertEquals(host.isEnabled(), result.isEnabled());
        assertEquals(host.getDescription(), result.getDescription());
        assertEquals(host.getHostname(), result.getHostname());
    }
View Full Code Here

Examples of com.s3auth.hosts.Host

                    HttpHeaders.HOST
                )
            );
        }
        final String domain = headers.get(HttpHeaders.HOST).iterator().next();
        final Host host;
        if (LocalHost.isIt(domain)) {
            host = new LocalHost();
        } else {
            try {
                host = new SecuredHost(this.hosts.find(domain), request);
View Full Code Here

Examples of com.xensource.xenapi.Host

        try {
            prepareISO(connection, vmSpec.getName());
            Map<String, String> other = new HashMap<String, String>();
            other.put("live", "true");
            Network networkForSm = getNativeNetworkForTraffic(connection, TrafficType.Storage, null).getNetwork();
            Host host = Host.getByUuid(connection, _host.uuid);
            Map<String,String> token = host.migrateReceive(connection, networkForSm, other);

            // Get the vm to migrate.
            Set<VM> vms = VM.getByNameLabel(connection, vmSpec.getName());
            VM vmToMigrate = vms.iterator().next();
View Full Code Here

Examples of gov.nist.core.Host

    SIPTransaction returnChannel;

    // Create a new client transaction around the
    // superclass' message channel
    // Create the host/port of the target hop
    Host targetHost = new Host();
    targetHost.setHostname(nextHop.getHost());
    HostPort targetHostPort = new HostPort();
    targetHostPort.setHost(targetHost);
    targetHostPort.setPort(nextHop.getPort());
    MessageChannel mc = mp.createMessageChannel(targetHostPort);
View Full Code Here

Examples of io.fathom.cloud.compute.api.os.model.Host

    //
    // return toModel(schedulerHost);
    // }

    private Host toModel(SchedulerHost host) {
        Host model = new Host();
        model.name = Long.toString(host.getId());

        HostData hostData = host.getHostData();

        model.service = "compute";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.