Examples of SyncCallback


Examples of org.chromium.sdk.SyncCallback

      public void failure(Exception exception) {
        ChromiumDebugPlugin.log(new Exception("Failed to 'drop to frame' action", exception));
      }
    };

    SyncCallback syncCallback = new SyncCallback() {
      @Override
      public void callbackDone(RuntimeException e) {
        if (e != null) {
          ChromiumDebugPlugin.log(e);
        }
View Full Code Here

Examples of org.chromium.sdk.SyncCallback

        @Override
        public void done(T res) {
          resultIsReady(res);
        }
      };
      SyncCallback syncCallback = new SyncCallback() {
        @Override
        public void callbackDone(RuntimeException e) {
          resultIsReadySync(e);
        }
      };
View Full Code Here

Examples of org.chromium.sdk.SyncCallback

    init();
  }

  private void init() {
    SyncCallback syncCallback = new SyncCallback() {
      @Override
      public void callbackDone(RuntimeException e) {
        // This statement suits sync callback more rather than a regular callback:
        // it's safe enough and we prefer to execute it event if the command failed.
        scriptManager.endPopulateScriptMode();
View Full Code Here

Examples of org.chromium.sdk.SyncCallback

      public void failure(Exception exception) {
        ChromiumDebugPlugin.log(new Exception("Failed to 'drop to frame' action", exception));
      }
    };

    SyncCallback syncCallback = new SyncCallback() {
      @Override
      public void callbackDone(RuntimeException e) {
        if (e != null) {
          ChromiumDebugPlugin.log(e);
        }
View Full Code Here

Examples of org.chromium.sdk.SyncCallback

    init();
  }

  private void init() {
    SyncCallback syncCallback = new SyncCallback() {
      @Override
      public void callbackDone(RuntimeException e) {
        // This statement suits sync callback more rather than a regular callback:
        // it's safe enough and we prefer to execute it event if the command failed.
        scriptManager.endPopulateScriptMode();
View Full Code Here

Examples of org.chromium.sdk.SyncCallback

    scriptData.sourceLoadedFuture.initializeRunning(new SourceLoadOperation(script, sourceID));

    final ScriptPopulateMode populateModeSaved = populateMode;

    AsyncFuture.Callback<Boolean> callback;
    SyncCallback syncCallback;

    if (populateModeSaved == null) {
      callback = new AsyncFuture.Callback<Boolean>() {
        @Override
        public void done(Boolean res) {
          tabImpl.getTabListener().getDebugEventListener().scriptLoaded(script);
        }
      };
      syncCallback = null;
    } else {
      populateModeSaved.anotherSourceToWait();

      callback = new AsyncFuture.Callback<Boolean>() {
        @Override
        public void done(Boolean res) {
          populateModeSaved.sourceLoaded(res);
        }
      };
      syncCallback = new SyncCallback() {
        @Override
        public void callbackDone(RuntimeException e) {
          populateModeSaved.sourceLoadedSync(e);
        }
      };
View Full Code Here

Examples of org.chromium.sdk.SyncCallback

    init();
  }

  private void init() {
    SyncCallback syncCallback = new SyncCallback() {
      @Override
      public void callbackDone(RuntimeException e) {
        // This statement suits sync callback more rather than a regular callback:
        // it's safe enough and we prefer to execute it event if the command failed.
        scriptManager.endPopulateScriptMode();
View Full Code Here

Examples of org.voltdb.client.SyncCallback

            int f_d1 = i % 10; // 10 unique dim1s
            int f_d2 = i % 50; // 50 unique dim2s
            int f_d3 = i % 100; // 100 unique dim3s

            boolean done;
            SyncCallback cb = new SyncCallback();
            do {
                done = client.callProcedure(cb, "InsertF", pkey++, f_d1, f_d2, f_d3,
                                            2, (i * 10), (i % 2));
                if (!done) {
                    client.backpressureBarrier();
                }
            } while (!done);


            if (!async) {
                cb.waitForResponse();
                vt = cb.getResponse().getResults()[0];
                assertTrue(vt.getRowCount() == 1);
                // assertTrue(vt.asScalarLong() == 1);
            }
        }

View Full Code Here

Examples of org.voltdb.client.SyncCallback

        // don't care if this succeeds or fails.
        // calling the new proc before the cat change returns is not guaranteed to work
        // we just hope it doesn't crash anything
        int x = 3;
        SyncCallback cb = new SyncCallback();
        client.callProcedure(cb,
                org.voltdb.benchmark.tpcc.procedures.InsertOrderLineBatched.class.getSimpleName(),
                new long[] {x}, new long[] {x}, x, new long[] {x},
                new long[] {x}, new long[] {x}, new TimestampType[] { new TimestampType() }, new long[] {x},
                new double[] {x}, new String[] {"a"});
        cb.waitForResponse();

        // make sure the previous catalog change has completed
        client.drain();

        // now calling the new proc better work
        x = 2;
        client.callProcedure(org.voltdb.benchmark.tpcc.procedures.InsertOrderLineBatched.class.getSimpleName(),
                new long[] {x}, new long[] {x}, x, new long[] {x},
                new long[] {x}, new long[] {x}, new TimestampType[] { new TimestampType() }, new long[] {x},
                new double[] {x}, new String[] {"a"});

        loadSomeData(client, 50, 5);

        // this is a do nothing change... shouldn't affect anything
        newCatalogURL = VoltServerConfig.getPathToCatalogForTest("catalogupdate-cluster-expanded.jar");
        results = client.callProcedure("@UpdateApplicationCatalog", newCatalogURL).getResults();
        assertTrue(results.length == 1);

        client.drain();

        // now calling the new proc better work
        x = 4;
        client.callProcedure(org.voltdb.benchmark.tpcc.procedures.InsertOrderLineBatched.class.getSimpleName(),
                new long[] {x}, new long[] {x}, x, new long[] {x},
                new long[] {x}, new long[] {x}, new TimestampType[] { new TimestampType() }, new long[] {x},
                new double[] {x}, new String[] {"a"});

        loadSomeData(client, 55, 5);

        // remove the procedure we just added async
        newCatalogURL = VoltServerConfig.getPathToCatalogForTest("catalogupdate-cluster-base.jar");
        callback = new CatTestCallback(Status.OK);
        client.callProcedure(callback, "@UpdateApplicationCatalog", newCatalogURL);

        // don't care if this works now
        x = 4;
        cb = new SyncCallback();
        client.callProcedure(cb,
                org.voltdb.benchmark.tpcc.procedures.InsertOrderLineBatched.class.getSimpleName(),
                new long[] {x}, new long[] {x}, x, new long[] {x},
                new long[] {x}, new long[] {x}, new TimestampType[] { new TimestampType() }, new long[] {x},
                new double[] {x}, new String[] {"a"});
        cb.waitForResponse();

        // make sure the previous catalog change has completed
        client.drain();

        // now calling the new proc better fail
        x = 5;
        cb = new SyncCallback();
        client.callProcedure(cb,
                org.voltdb.benchmark.tpcc.procedures.InsertOrderLineBatched.class.getSimpleName(),
                new long[] {x}, new long[] {x}, x, new long[] {x},
                new long[] {x}, new long[] {x}, new TimestampType[] { new TimestampType() }, new long[] {x},
                new double[] {x}, new String[] {"a"});
        cb.waitForResponse();
        assertNotSame(cb.getResponse().getStatus(), Status.OK);

        loadSomeData(client, 60, 5);

        // change the insert new order procedure
        newCatalogURL = VoltServerConfig.getPathToCatalogForTest("catalogupdate-cluster-conflict.jar");
View Full Code Here

Examples of org.voltdb.client.SyncCallback

        Collections.shuffle(a_int);
        Collections.shuffle(a_inline_str);
        Collections.shuffle(a_pool_str);

        for (int i=0; i < 20; i++) {
            SyncCallback cb = new SyncCallback();
            client.callProcedure(cb,
                    "InsertO1",
                    pkey++,
                    a_int.get(i),
                    a_inline_str.get(i),
                    a_pool_str.get(i));

            if (!async) {
                cb.waitForResponse();
                VoltTable vt = cb.getResponse().getResults()[0];
                assertTrue(vt.getRowCount() == 1);
            }
        }

        client.drain();
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.