Examples of total()


Examples of freenet.node.RequestTracker.CountedRequests.total()

      if(!requestsToNode) {
        this.expectedTransfersInCHKSR = countCHKSR.expectedTransfersIn();
        this.expectedTransfersInSSKSR = countSSKSR.expectedTransfersIn();
        this.expectedTransfersOutCHKSR = countCHKSR.expectedTransfersOut();
        this.expectedTransfersOutSSKSR = countSSKSR.expectedTransfersOut();
        this.totalRequestsSR = countCHKSR.total() + countSSKSR.total();
        this.expectedTransfersInCHK = countCHK.expectedTransfersIn() - expectedTransfersInCHKSR;
        this.expectedTransfersInSSK = countSSK.expectedTransfersIn() - expectedTransfersInSSKSR;
        this.expectedTransfersOutCHK = countCHK.expectedTransfersOut() - expectedTransfersOutCHKSR;
        this.expectedTransfersOutSSK = countSSK.expectedTransfersOut() - expectedTransfersOutSSKSR;
        this.totalRequests = (countCHK.total() + countSSK.total()) - totalRequestsSR;
View Full Code Here

Examples of io.fabric8.utils.CountingMap.total()

     */
    public static void assertMaximumContainerCountNotExceeded(FabricRequirements requirements, Map<String, CountingMap> hostToProfileCounts) {
        for (Map.Entry<String, CountingMap> entry : hostToProfileCounts.entrySet()) {
            String hostName = entry.getKey();
            CountingMap counts = entry.getValue();
            int total = counts.total();
            SshConfiguration sshConfiguration = requirements.getSshConfiguration();
            assertNotNull("Should have a sshConfiguration!", sshConfiguration);
            SshHostConfiguration hostConfiguration = sshConfiguration.getHost(hostName);
            assertNotNull("Should have a hosts configuration for host " + hostName, hostConfiguration);
            Integer maximumContainerCount = hostConfiguration.getMaximumContainerCount();
View Full Code Here

Examples of net.tomp2p.message.CountConnectionOutboundHandler.total()

            FutureDirect fd1 = sender.sendDirect(peerConnection).object("test")
                    .connectionTimeoutTCPMillis(2000).idleTCPSeconds(10 * 1000).start();
            fd1.awaitListenersUninterruptibly();
            Assert.assertEquals(true, fd1.isSuccess());
            Assert.assertEquals(1, ccohTCP.total());
            Assert.assertEquals(0, ccohUDP.total());
            Thread.sleep(2000);
            System.err.println("send second with the same connection");
            FutureDirect fd2 = sender.sendDirect(peerConnection).object("test").start();
            fd2.awaitUninterruptibly();
            Assert.assertEquals(1, ccohTCP.total());
View Full Code Here

Examples of org.apache.cassandra.db.context.CounterContext.total()

        ContextState state = ContextState.allocate(3, 2);
        state.writeElement(NodeId.fromInt(1), 1, 4, false);
        state.writeElement(id1, 3, 2, true);
        state.writeElement(id2, -System.currentTimeMillis(), 5, true); // corrupted!

        assert ctx.total(state.context) == 11;

        try
        {
            ctx.removeOldShards(state.context, Integer.MAX_VALUE);
            fail("RemoveOldShards should throw an exception if the current id is non-sensical");
View Full Code Here

Examples of org.apache.cassandra.db.context.CounterContext.total()

        }
        catch (RuntimeException e) {}

        NodeId.renewLocalId();
        ByteBuffer cleaned = ctx.removeOldShards(state.context, Integer.MAX_VALUE);
        assert ctx.total(cleaned) == 11;

        // Check it is not corrupted anymore
        ContextState state2 = new ContextState(cleaned);
        while (state2.hasRemaining())
        {
View Full Code Here

Examples of org.apache.cassandra.db.context.CounterContext.total()

            state2.moveToNext();
        }

        // Check that if we merge old and clean on another node, we keep the right count
        ByteBuffer onRemote = ctx.merge(ctx.clearAllDelta(state.context), ctx.clearAllDelta(cleaned), HeapAllocator.instance);
        assert ctx.total(onRemote) == 11;
    }
}
View Full Code Here

Examples of org.apache.cassandra.db.context.CounterContext.total()

        ContextState state = ContextState.allocate(3, 2);
        state.writeElement(NodeId.fromInt(1), 1, 4, false);
        state.writeElement(id1, 3, 2, true);
        state.writeElement(id2, -100, 5, true); // corrupted!

        assert ctx.total(state.context) == 11;

        try
        {
            ByteBuffer merger = ctx.computeOldShardMerger(state.context, Collections.<NodeId.NodeIdRecord>emptyList(), 0);
            ctx.removeOldShards(ctx.merge(state.context, merger, HeapAllocator.instance), now);
View Full Code Here

Examples of org.apache.cassandra.db.context.CounterContext.total()

        catch (RuntimeException e) {}

        NodeId.renewLocalId();
        ByteBuffer merger = ctx.computeOldShardMerger(state.context, Collections.<NodeId.NodeIdRecord>emptyList(), 0);
        ByteBuffer cleaned = ctx.removeOldShards(ctx.merge(state.context, merger, HeapAllocator.instance), now);
        assert ctx.total(cleaned) == 11;

        // Check it is not corrupted anymore
        ContextState state2 = new ContextState(cleaned);
        while (state2.hasRemaining())
        {
View Full Code Here

Examples of org.apache.cassandra.db.context.CounterContext.total()

            state2.moveToNext();
        }

        // Check that if we merge old and clean on another node, we keep the right count
        ByteBuffer onRemote = ctx.merge(ctx.clearAllDelta(state.context), ctx.clearAllDelta(cleaned), HeapAllocator.instance);
        assert ctx.total(onRemote) == 11;
    }
}
View Full Code Here

Examples of org.apache.cassandra.db.context.CounterContext.total()

        ContextState state = ContextState.allocate(3, 2);
        state.writeElement(NodeId.fromInt(1), 1, 4, false);
        state.writeElement(id1, 3, 2, true);
        state.writeElement(id2, -100, 5, true); // corrupted!

        assert ctx.total(state.context) == 11;

        try
        {
            ByteBuffer merger = ctx.computeOldShardMerger(state.context, Collections.<NodeId.NodeIdRecord>emptyList(), 0);
            ctx.removeOldShards(ctx.merge(state.context, merger), now);
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.