Package edu.brown.hstore.Hstoreservice

Examples of edu.brown.hstore.Hstoreservice.HeartbeatRequest


   
    /**
     * Send a heartbeat notification message to all the other sites in the cluster.
     */
    public void sendHeartbeat() {
        HeartbeatRequest request = HeartbeatRequest.newBuilder()
                                    .setSenderSite(this.local_site_id)
                                    .setLastTransactionId(-1) // FIXME
                                    .build();
        for (int site_id = 0; site_id < this.num_sites; site_id++) {
            if (site_id == this.local_site_id) continue;
            if (this.isShuttingDown()) break;
            try {
                this.channels[site_id].heartbeat(new ProtoRpcController(), request, this.heartbeatCallback);
                if (trace.val)
                    LOG.trace(String.format("Sent %s to %s",
                              request.getClass().getSimpleName(),
                              HStoreThreadManager.formatSiteName(site_id)));
            } catch (RuntimeException ex) {
                // Silently ignore these errors...
            }
        } // FOR
View Full Code Here

TOP

Related Classes of edu.brown.hstore.Hstoreservice.HeartbeatRequest

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.