Examples of ExceptionCallback


Examples of com.netflix.astyanax.ExceptionCallback

        Rows<ByteBuffer, ByteBuffer> result;
        try {
            /* Note: we need to fetch columns for each row as well to remove "range ghosts" */
            OperationResult op = allRowsQuery.setRowLimit(storeManager.getPageSize()) // pre-fetch that many rows at a time
                    .setConcurrencyLevel(1) // one execution thread for fetching portion of rows
                    .setExceptionCallback(new ExceptionCallback() {
                        private int retries = 0;

                        @Override
                        public boolean onException(ConnectionException e) {
                            try {
View Full Code Here

Examples of com.netflix.astyanax.ExceptionCallback

        try {
            OperationResult<Rows<String, String>> rows = keyspace
                    .prepareQuery(CF_ALLROWS).getAllRows().setConcurrencyLevel(2).setRowLimit(10)
                    .setRepeatLastToken(false)
                    .withColumnRange(new RangeBuilder().setLimit(0).build())
                    .setExceptionCallback(new ExceptionCallback() {
                        @Override
                        public boolean onException(ConnectionException e) {
                            Assert.fail(e.getMessage());
                            return true;
                        }
View Full Code Here

Examples of com.netflix.astyanax.ExceptionCallback

    AtomicLong counter = new AtomicLong(0);

    OperationResult<Rows<String, String>> rows = keyspace
        .prepareQuery(CF_ALL_ROWS).getAllRows().setConcurrencyLevel(2).setRowLimit(30)
        //.withColumnRange(new RangeBuilder().setLimit(0).build())
        .setExceptionCallback(new ExceptionCallback() {
          @Override
          public boolean onException(ConnectionException e) {
            Assert.fail(e.getMessage());
            return true;
          }
View Full Code Here

Examples of com.netflix.astyanax.ExceptionCallback

    public void testGetAll() {
        try {
            OperationResult<Rows<Long, String>> rows = keyspace.prepareQuery(CF_ALL_ROWS)
                .getAllRows()
                .setRowLimit(5)
                .setExceptionCallback(new ExceptionCallback() {
                    @Override
                    public boolean onException(ConnectionException e) {
                        Assert.fail(e.getMessage());
                        return true;
                    }
View Full Code Here

Examples of com.netflix.astyanax.ExceptionCallback

    public void testGetAllDefaults() {
        try {
            OperationResult<Rows<Long, String>> rows = keyspace.prepareQuery(CF_ALL_ROWS)
                .getAllRows()
//                  .setRowLimit(5)
                .setExceptionCallback(new ExceptionCallback() {
                    @Override
                    public boolean onException(ConnectionException e) {
                        Assert.fail(e.getMessage());
                        return true;
                    }
View Full Code Here

Examples of com.netflix.astyanax.ExceptionCallback

  public void testTokenRangeTest() {
    try {
      OperationResult<Rows<Long, String>> rows = keyspace.prepareQuery(CF_ALL_ROWS)
          .getAllRows()
          .setRowLimit(5)
          .setExceptionCallback(new ExceptionCallback() {
            @Override
            public boolean onException(ConnectionException e) {
              Assert.fail(e.getMessage());
              return true;
            }
View Full Code Here

Examples of org.gatein.wci.spi.callbacks.ExceptionCallback

         //
         WebApp webApp = registry.getWebApp("/test-spi-app");
         NormalCallback cb1 = new NormalCallback(appContext, webApp.getClassLoader());
         Exception ex = new Exception();
         ExceptionCallback cb2 = new ExceptionCallback(appContext, ex, ex);
         Error err = new Error();
         ExceptionCallback cb3 = new ExceptionCallback(appContext, err, err);
         RuntimeException rex = new RuntimeException();
         ExceptionCallback cb4 = new ExceptionCallback(appContext, rex, rex);
         IOException ioe = new IOException();
         ExceptionCallback cb5 = new ExceptionCallback(appContext, ioe, ioe);

         //
         ServletContextDispatcher dispatcher = new ServletContextDispatcher(req, resp, container);
         DriverResponse response = cb1.test(null, dispatcher);
         response = cb2.test(response, dispatcher);
         response = cb3.test(response, dispatcher);
         response = cb4.test(response, dispatcher);
         response = cb5.test(response, dispatcher);

         //
         if (response != null)
         {
            return response;
View Full Code Here

Examples of org.gatein.wci.spi.callbacks.ExceptionCallback

         //
         WebApp webApp = registry.getWebApp("/test-native-skip-with-gateinservlet-app");
         NormalCallback cb1 = new NormalCallback(appContext, webApp.getClassLoader());
         Exception ex = new Exception();
         ExceptionCallback cb2 = new ExceptionCallback(appContext, ex, ex);
         Error err = new Error();
         ExceptionCallback cb3 = new ExceptionCallback(appContext, err, err);
         RuntimeException rex = new RuntimeException();
         ExceptionCallback cb4 = new ExceptionCallback(appContext, rex, rex);
         IOException ioe = new IOException();
         ExceptionCallback cb5 = new ExceptionCallback(appContext, ioe, ioe);

         //
         ServletContextDispatcher dispatcher = new ServletContextDispatcher(req, resp, container);
         DriverResponse response = cb1.test(null, dispatcher);
         response = cb2.test(response, dispatcher);
         response = cb3.test(response, dispatcher);
         response = cb4.test(response, dispatcher);
         response = cb5.test(response, dispatcher);

         return new UndeployResponse("test-native-skip-with-gateinservlet-app.war");
      }

      else if (getRequestCount() == 3)
View Full Code Here

Examples of org.mule.tck.testmodels.mule.TestExceptionStrategy.ExceptionCallback

        latch = new Latch();
        systemExceptionCounter.set(0);
        serviceExceptionCounter.set(0);

        TestExceptionStrategy systemExceptionListener = new TestExceptionStrategy();
        systemExceptionListener.setExceptionCallback(new ExceptionCallback()
        {
            public void onException(Throwable t)
            {
                systemExceptionCounter.incrementAndGet();
                latch.countDown();
            }
        });
        muleContext.setExceptionListener(systemExceptionListener);

        TestExceptionStrategy serviceExceptionListener =
            (TestExceptionStrategy) muleContext.getRegistry().lookupModel("TestModel").getExceptionListener();
        serviceExceptionListener.setExceptionCallback(new ExceptionCallback()
        {
            public void onException(Throwable t)
            {
                serviceExceptionCounter.incrementAndGet();
                latch.countDown();
View Full Code Here

Examples of org.mule.tck.testmodels.mule.TestExceptionStrategy.ExceptionCallback

        assertNotNull("The payloadAsString shouln't have been null", payloadAsString);
        assertFalse("There shouldn't be a fault in the payload: " + payloadAsString,
            payloadAsString.contains("<soap:Fault>"));

        final Latch latch = new Latch();
        exceptionStrategy.setExceptionCallback(new ExceptionCallback()
        {
            public void onException(Throwable t)
            {
                connectorExceptionCounter.incrementAndGet();
                latch.countDown();
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.