Examples of IAsyncCallback


Examples of org.apache.cassandra.net.IAsyncCallback

                if (logger.isDebugEnabled())
                    logger.debug("Digest mismatch:", e);

                ReadCommand readCommand = (ReadCommand) command;
                final RowRepairResolver repairResolver = new RowRepairResolver(readCommand.table, readCommand.key);
                IAsyncCallback repairHandler = new AsyncRepairCallback(repairResolver, endpoints.size());

                for (InetAddress endpoint : endpoints)
                    MessagingService.instance().sendRR(readCommand, endpoint, repairHandler);
            }
        }
View Full Code Here

Examples of org.apache.cassandra.net.IAsyncCallback

    private void doReadRepair() throws IOException
    {
      IResponseResolver<Row> readResponseResolver = new ReadResponseResolver();
            /* Add the local storage endpoint to the replicas_ list */
            replicas_.add(StorageService.getLocalStorageEndPoint());
      IAsyncCallback responseHandler = new DataRepairHandler(ConsistencyManager.this.replicas_.size(), readResponseResolver)
            ReadCommand readCommand = constructReadMessage(false);
            Message message = readCommand.makeReadMessage();
            logger_.debug("Performing read repair for " + readCommand_.key + " to " + message.getMessageId() + "@[" + StringUtils.join(replicas_, ", ") + "]");
      MessagingService.getMessagingInstance().sendRR(message, replicas_.toArray(new EndPoint[replicas_.size()]), responseHandler);
    }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IAsyncCallback

    // If the proxy is also an instance of IHelloAsync then use
    // this asynchronous interface to invoke methods asynchronously
    if (proxy instanceof IHelloAsync) {
      IHelloAsync helloA = (IHelloAsync) proxy;
      // Create callback for use in IHelloAsync
      IAsyncCallback callback = new IAsyncCallback<String>() {
        public void onSuccess(String result) {
          System.out.println("COMPLETED remote call with callback SUCCESS with result="+result);
          System.out.println();
        }
        public void onFailure(Throwable t) {
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.