Package com.proofpoint.stats

Examples of com.proofpoint.stats.SparseCounterStat$Counter


        ImmutableSet<URI> expected = ImmutableSet.of(URI.create("http://apple-a.example.com"), URI.create("https://apple-a.example.com"));
        SparseTimeStat failureTimeStat = mock(SparseTimeStat.class);
        when(httpServiceBalancerStats.requestTime(any(URI.class), eq(Status.FAILURE))).thenReturn(failureTimeStat);
        SparseTimeStat successTimeStat = mock(SparseTimeStat.class);
        when(httpServiceBalancerStats.requestTime(any(URI.class), eq(Status.SUCCESS))).thenReturn(successTimeStat);
        SparseCounterStat counterStat = mock(SparseCounterStat.class);
        when(httpServiceBalancerStats.failure(any(URI.class), eq("testing failure"))).thenReturn(counterStat);

        httpServiceBalancer.updateHttpUris(expected);

        Set<URI> uris = new HashSet<>();
View Full Code Here


        URI secondUri = URI.create("https://apple-a.example.com");
        SparseTimeStat failureTimeStat = mock(SparseTimeStat.class);
        when(httpServiceBalancerStats.requestTime(any(URI.class), eq(Status.FAILURE))).thenReturn(failureTimeStat);
        SparseTimeStat successTimeStat = mock(SparseTimeStat.class);
        when(httpServiceBalancerStats.requestTime(any(URI.class), eq(Status.SUCCESS))).thenReturn(successTimeStat);
        SparseCounterStat counterStat = mock(SparseCounterStat.class);
        when(httpServiceBalancerStats.failure(any(URI.class), eq("testing failure"))).thenReturn(counterStat);

        httpServiceBalancer.updateHttpUris(ImmutableSet.of(firstUri));

        HttpServiceAttempt attempt = httpServiceBalancer.createAttempt();
View Full Code Here

        ImmutableSet<URI> expected = ImmutableSet.of(URI.create("http://apple-a.example.com"), URI.create("https://apple-a.example.com"));
        SparseTimeStat failureTimeStat = mock(SparseTimeStat.class);
        when(httpServiceBalancerStats.requestTime(any(URI.class), eq(Status.FAILURE))).thenReturn(failureTimeStat);
        SparseTimeStat successTimeStat = mock(SparseTimeStat.class);
        when(httpServiceBalancerStats.requestTime(any(URI.class), eq(Status.SUCCESS))).thenReturn(successTimeStat);
        SparseCounterStat counterStat = mock(SparseCounterStat.class);
        when(httpServiceBalancerStats.failure(any(URI.class), eq("testing failure"))).thenReturn(counterStat);

        httpServiceBalancer.updateHttpUris(expected);

        HttpServiceAttempt attempt = httpServiceBalancer.createAttempt();
View Full Code Here

        ImmutableSet<URI> expected = ImmutableSet.of(URI.create("http://apple-a.example.com"), URI.create("https://apple-a.example.com"));
        SparseTimeStat failureTimeStat = mock(SparseTimeStat.class);
        when(httpServiceBalancerStats.requestTime(any(URI.class), eq(Status.FAILURE))).thenReturn(failureTimeStat);
        SparseTimeStat successTimeStat = mock(SparseTimeStat.class);
        when(httpServiceBalancerStats.requestTime(any(URI.class), eq(Status.SUCCESS))).thenReturn(successTimeStat);
        SparseCounterStat counterStat = mock(SparseCounterStat.class);
        when(httpServiceBalancerStats.failure(any(URI.class), eq("testing failure"))).thenReturn(counterStat);

        httpServiceBalancer.updateHttpUris(expected);

        for (int i = 0; i < 10; ++i) {
View Full Code Here

TOP

Related Classes of com.proofpoint.stats.SparseCounterStat$Counter

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.