Examples of cause()


Examples of akka.event.Logging.Error.cause()

                    assertEquals(message, log.message());
                    assertEquals(level, log.level());
                    assertEquals(mdc, log.mdc().toString());
                    if(cause != null) {
                        Error error = (Error) log;
                        assertSame(cause, error.cause());
                    }
                    return null;
                }
            };
        }
View Full Code Here

Examples of com.basho.riak.client.core.operations.DtUpdateOperation.cause()

       
        update.await();
       
        if (!update.isSuccess())
        {
            fail("Update operation failed: " + update.cause().toString());
        }
       
        RiakMap map;
        if (returnBody)
        {
View Full Code Here

Examples of com.basho.riak.client.core.operations.FetchOperation.cause()

       
        try
        {
            operation.await();
            assertFalse(operation.isSuccess());
            assertNotNull(operation.cause());
        }
        finally
        {
            cluster.shutdown().get();
        }
View Full Code Here

Examples of com.basho.riak.client.core.operations.FetchOperation.cause()

                    .build();
       
        boolean accepted = node.execute(operation);
        operation.await();
        assertFalse(operation.isSuccess());
        assertNotNull(operation.cause());
        node.shutdown().get();
    }

    @Test
    public void nodeChangesStateOnPoolState() throws UnknownHostException, IOException, InterruptedException, ExecutionException
View Full Code Here

Examples of com.basho.riak.client.core.operations.PingOperation.cause()

        PingOperation ping = new PingOperation();
        cluster.execute(ping);
        ping.await();
       
        assertFalse(ping.isSuccess());
        assertNotNull(ping.cause());
       
        cluster.shutdown();
       
    }
}
View Full Code Here

Examples of com.basho.riak.client.core.operations.StoreBucketPropsOperation.cause()

        cluster.execute(propsOp);
        propsOp.await();
       
        if (!propsOp.isSuccess())
        {
            assertTrue(propsOp.cause().toString(), propsOp.isSuccess());
        }
       
        Thread.sleep(5000);
       
        prepSearch(yokozunaBucketType, searchBucket);
View Full Code Here

Examples of com.basho.riak.client.core.operations.YzFetchIndexOperation.cause()

       
        cluster.execute(fetchOp);
        fetchOp.await();
        if (!fetchOp.isSuccess())
        {
            assertTrue(fetchOp.cause().toString(), fetchOp.isSuccess());
        }
       
        List<YokozunaIndex> indexList = fetchOp.get().getIndexes();
       
        assertFalse(indexList.isEmpty());
View Full Code Here

Examples of com.codahale.metrics.annotation.ExceptionMetered.cause()

    private final Class<? extends Throwable> exceptionClass;

    public ExceptionMeteredMetricsFilter(MetricRegistry metricRegistry, ResourceInfo resourceInfo) {
        final ExceptionMetered annotation = resourceInfo.getResourceMethod().getAnnotation(ExceptionMetered.class);
        meter = metricRegistry.meter(chooseName(annotation.name(), annotation.absolute(), resourceInfo.getResourceMethod(), ExceptionMetered.DEFAULT_NAME_SUFFIX));
        exceptionClass = annotation.cause();
    }

    @Override
    public void filter(ContainerRequestContext requestContext) throws IOException {
        // nothing to do, we are counting exceptions after the request was handled
View Full Code Here

Examples of com.codahale.metrics.annotation.ExceptionMetered.cause()

                                           method,
                                           ExceptionMetered.DEFAULT_NAME_SUFFIX);
            final Meter meter = registry.meter(name);
            dispatcher = new ExceptionMeteredRequestDispatcher(dispatcher,
                                                               meter,
                                                               annotation.cause());
        }

        return dispatcher;
    }
View Full Code Here

Examples of com.codahale.metrics.annotation.ExceptionMetered.cause()

class ExceptionMeteredInterceptor implements MethodInterceptor {
    static MethodInterceptor forMethod(MetricRegistry metricRegistry, Class<?> klass, Method method) {
        final ExceptionMetered annotation = method.getAnnotation(ExceptionMetered.class);
        if (annotation != null) {
            final Meter meter = metricRegistry.meter(determineName(annotation, klass, method));
            return new ExceptionMeteredInterceptor(meter, annotation.cause());
        }
        return null;
    }

    private static String determineName(ExceptionMetered annotation, Class<?> klass, Method method) {
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.