Package edu.brown.hstore.Hstoreservice

Examples of edu.brown.hstore.Hstoreservice.ShutdownPrepareRequest


                buffer.rewind();
                builder.setError(ByteString.copyFrom(buffer));
                if (debug.val)
                    LOG.debug("Serializing error message in shutdown request");
            }
            ShutdownPrepareRequest request = builder.build();
           
            if (debug.val)
                LOG.debug(String.format("Sending %s to %d remote sites",
                          request.getClass().getSimpleName(), this.num_sites-1));
            for (int site_id = 0; site_id < this.num_sites; site_id++) {
                if (site_id == this.local_site_id) continue;
               
                if (this.channels[site_id] == null) {
                    LOG.error(String.format("Trying to send %s to %s before the connection was established",
                              request.getClass().getSimpleName(),
                              HStoreThreadManager.formatSiteName(site_id)));
                } else {
                    this.channels[site_id].shutdownPrepare(new ProtoRpcController(), request, callback);
                    if (trace.val)
                        LOG.trace(String.format("Sent %s to %s",
                                  request.getClass().getSimpleName(),
                                  HStoreThreadManager.formatSiteName(site_id)));
                }
            } // FOR
        }
       
View Full Code Here


        buffer.rewind();
       
        ShutdownPrepareRequest.Builder builder = ShutdownPrepareRequest.newBuilder()
                                                        .setSenderSite(0)
                                                        .setError(ByteString.copyFrom(buffer));
        ShutdownPrepareRequest request = builder.build();
       
        assertTrue(request.hasError());
        buffer = request.getError().asReadOnlyByteBuffer();
        SerializableException clone = SerializableException.deserializeFromBuffer(buffer);
        assertTrue(clone.getMessage(), clone.getMessage().contains(errorMsg));
    }
View Full Code Here

TOP

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

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.