Examples of waitComplete()


Examples of com.addthis.meshy.service.file.FileSource.waitComplete()

            try (Meshy more = new MeshyClient(args[1], Integer.parseInt(args[2]))) {
                if (args.length > 3) {
                    String cmd = args[3];
                    if (cmd.equals("ls") && args.length > 4) {
                        FileSource fileSource = new FileSource(more, new String[]{args[4]});
                        fileSource.waitComplete();
                        for (FileReference file : fileSource.getFileList()) {
                            System.out.println(file.getHostUUID() + " " + file.name + " \t " + file.size + " \t " + new Date(file.lastModified));
                        }
                    } else if (cmd.equals("cat") && args.length > 5) {
                        StreamSource source = null;
View Full Code Here

Examples of com.addthis.meshy.service.file.FileSource.waitComplete()

                        final DecimalFormat number = new DecimalFormat("#,###");
                        final AtomicLong totalBytes = new AtomicLong(0);
                        final AtomicLong readBytes = new AtomicLong(0);
                        final AtomicLong lastEmit = new AtomicLong(JitterClock.globalTime());
                        final FileSource fs = new FileSource(more, fileMatch, new DupFilter());
                        fs.waitComplete();
                        final Iterator<FileReference> fsIter = fs.getFileList().iterator();
                        final HashMap<FileReference, Long> perfData = new HashMap<>();
                        final AtomicInteger open = new AtomicInteger(0);

                        class SourceReader extends Thread {
View Full Code Here

Examples of com.addthis.meshy.service.file.FileSource.waitComplete()

    public Collection<FileReference> listFiles(final String[] paths) throws IOException {
        if (closed.get()) {
            throw new IOException("client connection closed");
        }
        FileSource fileSource = new FileSource(this, paths);
        fileSource.waitComplete();
        return fileSource.getFileList();
    }

    /**
     * async version
View Full Code Here

Examples of com.addthis.meshy.service.file.FileSource.waitComplete()

    public Collection<FileReference> listFiles(final String paths[]) throws IOException {
        if (closed.get()) {
            throw new IOException("client connection closed");
        }
        FileSource fileSource = new FileSource(this, paths);
        fileSource.waitComplete();
        return fileSource.getFileList();
    }

    /**
     * async version
View Full Code Here

Examples of com.addthis.meshy.service.host.HostSource.waitComplete()

                        HostSource hostSource = new HostSource(more);
                        for (int i = 4; i < args.length; i++) {
                            hostSource.addPeer(args[i]);
                        }
                        hostSource.sendRequest();
                        hostSource.waitComplete();
                        for (HostNode node : hostSource.getHostList()) {
                            System.out.println(node.uuid + " \t " + node.address);
                        }
                    } else if (cmd.equals("madcat") && args.length > 5) {
                    /* usage: madcat <readers> <bufferSize> <filematch> */
 
View Full Code Here

Examples of com.addthis.meshy.service.stream.StreamSource.waitComplete()

                                    break;
                                }
                                System.out.write(buffer, 0, read);
                            }
                        }
                        source.waitComplete();
                    } else if (cmd.equals("peer")) {
                        HostSource hostSource = new HostSource(more);
                        for (int i = 4; i < args.length; i++) {
                            hostSource.addPeer(args[i]);
                        }
View Full Code Here

Examples of com.addthis.meshy.service.stream.StreamSource.waitComplete()

                            }

                            private void setup(FileReference ref) throws IOException {
                                if (in != null) {
                                    perfData.put(current, System.currentTimeMillis() - start);
                                    source.waitComplete();
                                    in.close();
                                }
                                if (ref != null) {
                                    start = System.currentTimeMillis();
                                    source = new StreamSource(more, ref.getHostUUID(), ref.name, bufferSize);
View Full Code Here

Examples of org.openstack.client.compute.AsyncServerOperation.waitComplete()

        log.info("Launching new server: " + create.getName());
        createServerOperation = computeClient.createServer(create);
      }

      log.info("Waiting for server to be ready");
      Server server = createServerOperation.waitComplete();
      Server instanceInfo = null;
      String stateName = null;
      while (true) {
        instanceInfo = getInstanceInfo(computeClient, server.getId());
View Full Code Here

Examples of org.platformlayer.service.cloud.google.ops.compute.GoogleComputeClient.waitComplete()

        // securityGroup = openstackHelpers.getMachineSecurityGroup(computeClient, server);
        // }

        Operation terminateOperation = computeClient.terminateInstance(instanceId);
        try {
          computeClient.waitComplete(terminateOperation, 5, TimeUnit.MINUTES);
        } catch (TimeoutException e) {
          throw new OpsException("Timeout while waiting for instance termination", e);
        }

        // if (securityGroup != null) {
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.