Package edu.brown.hstore.Hstoreservice

Examples of edu.brown.hstore.Hstoreservice.TransactionInitRequest


           
            // Send out all of the prefetch requests first
            for (int site_id = 0; site_id < this.num_sites; site_id++) {
                // Blast out this mofo. Tell them that Rico sent you...
                if (builders[site_id] != null && builders[site_id].getPrefetchFragmentsCount() > 0) {
                    TransactionInitRequest request = builders[site_id].build();
                    if (site_id == this.local_site_id) {
                        this.transactionInit_handler.remoteHandler(null, request, null);   
                    } else {
                        ProtoRpcController controller = ts.getTransactionInitController(site_id);
                        this.channels[site_id].transactionInit(controller, request, callback);
                    }
                    prefetch_ctr += request.getPrefetchFragmentsCount();
                    sent_ctr++;
                    builders[site_id] = null;
                }
            } // FOR
           
            // Then send out the ones without prefetching. These should all be the same
            // builder so we have to make sure that we only build it once.
            TransactionInitRequest request = null;
            for (int site_id = 0; site_id < this.num_sites; site_id++) {
                if (builders[site_id] != null) {
                    if (request == null) request = builders[site_id].build();
                    if (site_id == this.local_site_id) {
                        this.transactionInit_handler.remoteHandler(null, request, null);   
View Full Code Here


        assertNull(requests[3]);

        // The WorkFragments are grouped by siteID.
        assert (requests.length == num_sites);
        for (int siteid = 0; siteid < num_sites; ++siteid) {
            TransactionInitRequest request = requests[siteid];
            if (request != null && request.getPrefetchFragmentsCount() > 0) {
                List<WorkFragment> frags = request.getPrefetchFragmentsList();
                for (WorkFragment frag : frags) {
                    assertEquals(siteid, this.partition_site_xref[frag.getPartitionId()]);
                    assertTrue(frag.getPrefetch());
                }
            }
        }

        // The WorkFragment doesn't exist for the base partition.
        TransactionInitRequest request = requests[base_site];
        for (WorkFragment frag : request.getPrefetchFragmentsList()) {
            assertFalse(frag.getPartitionId() == LOCAL_PARTITION);
            assertTrue(frag.getPrefetch());
        }

    }
View Full Code Here

    @SuppressWarnings("unchecked")
    @Override
    public void runImpl(Object o[]) {
        RpcController controller = (RpcController)o[0];
        TransactionInitRequest request = (TransactionInitRequest)o[1];
        RpcCallback<TransactionInitResponse> callback = (RpcCallback<TransactionInitResponse>)o[2];
        hstore_coordinator.getTransactionInitHandler().remoteHandler(controller, request, callback);
    }
View Full Code Here

TOP

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

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.