Package org.apache.qpid.server.flow

Examples of org.apache.qpid.server.flow.LimitlessCreditManager


    {

        _subscriptionTarget = ConsumerTarget_0_8.createAckTarget(_channel,
                                                                 DEFAULT_CONSUMER_TAG,
                                                                 null,
                                                                 new LimitlessCreditManager());
        _consumer = _queue.addConsumer(_subscriptionTarget, null, AMQMessage.class, DEFAULT_CONSUMER_TAG.toString(),
                                       EnumSet.of(ConsumerImpl.Option.SEES_REQUEUES,
                                                  ConsumerImpl.Option.ACQUIRES));

        final int msgCount = 10;
View Full Code Here


    {

        _subscriptionTarget = ConsumerTarget_0_8.createAckTarget(_channel,
                                                                 DEFAULT_CONSUMER_TAG,
                                                                 null,
                                                                 new LimitlessCreditManager());
        _consumer = _queue.addConsumer(_subscriptionTarget, null, AMQMessage.class, DEFAULT_CONSUMER_TAG.toString(),
                                       EnumSet.of(ConsumerImpl.Option.SEES_REQUEUES,
                                                  ConsumerImpl.Option.ACQUIRES));

        final int msgCount = 10;
View Full Code Here

    {

        _subscriptionTarget = ConsumerTarget_0_8.createAckTarget(_channel,
                                                                 DEFAULT_CONSUMER_TAG,
                                                                 null,
                                                                 new LimitlessCreditManager());
        _consumer = _queue.addConsumer(_subscriptionTarget, null, AMQMessage.class, DEFAULT_CONSUMER_TAG.toString(),
                                       EnumSet.of(ConsumerImpl.Option.SEES_REQUEUES,
                                                  ConsumerImpl.Option.ACQUIRES));

        final int msgCount = 10;
View Full Code Here

     * Tests that the acknowledgements are correctly associated with a channel and
     * order is preserved when acks are enabled
     */
    public void testAckChannelAssociationTest() throws AMQException
    {
        _subscription = SubscriptionFactoryImpl.INSTANCE.createSubscription(5, _protocolSession, DEFAULT_CONSUMER_TAG, true, null, false, new LimitlessCreditManager());
        final int msgCount = 10;
        publishMessages(msgCount, true);

        UnacknowledgedMessageMap map = _channel.getUnacknowledgedMessageMap();
        assertEquals("",msgCount,map.size());
View Full Code Here

     * Tests that in no-ack mode no messages are retained
     */
    public void testNoAckMode() throws AMQException
    {
        // false arg means no acks expected
        _subscription = SubscriptionFactoryImpl.INSTANCE.createSubscription(5, _protocolSession, DEFAULT_CONSUMER_TAG, false, null, false, new LimitlessCreditManager());
        final int msgCount = 10;
        publishMessages(msgCount);

        UnacknowledgedMessageMap map = _channel.getUnacknowledgedMessageMap();
        assertTrue(map.size() == 0);
View Full Code Here

     * Tests that in no-ack mode no messages are retained
     */
    public void testPersistentNoAckMode() throws AMQException
    {
        // false arg means no acks expected
        _subscription = SubscriptionFactoryImpl.INSTANCE.createSubscription(5, _protocolSession, DEFAULT_CONSUMER_TAG, false,null,false, new LimitlessCreditManager());
        final int msgCount = 10;
        publishMessages(msgCount, true);

        UnacknowledgedMessageMap map = _channel.getUnacknowledgedMessageMap();
        assertTrue(map.size() == 0);
View Full Code Here

     * Tests that a single acknowledgement is handled correctly (i.e multiple flag not
     * set case)
     */
    public void testSingleAckReceivedTest() throws AMQException
    {
        _subscription = SubscriptionFactoryImpl.INSTANCE.createSubscription(5, _protocolSession, DEFAULT_CONSUMER_TAG, true,null,false, new LimitlessCreditManager());
        final int msgCount = 10;
        publishMessages(msgCount);

        _channel.acknowledgeMessage(5, false);
        UnacknowledgedMessageMap map = _channel.getUnacknowledgedMessageMap();
View Full Code Here

     * Tests that a single acknowledgement is handled correctly (i.e multiple flag not
     * set case)
     */
    public void testMultiAckReceivedTest() throws AMQException
    {
        _subscription = SubscriptionFactoryImpl.INSTANCE.createSubscription(5, _protocolSession, DEFAULT_CONSUMER_TAG, true,null,false, new LimitlessCreditManager());
        final int msgCount = 10;
        publishMessages(msgCount);

        _channel.acknowledgeMessage(5, true);
        UnacknowledgedMessageMap map = _channel.getUnacknowledgedMessageMap();
View Full Code Here

    /**
     * Tests that a multiple acknowledgement is handled correctly. When ack'ing all pending msgs.
     */
    public void testMultiAckAllReceivedTest() throws AMQException
    {
        _subscription = SubscriptionFactoryImpl.INSTANCE.createSubscription(5, _protocolSession, DEFAULT_CONSUMER_TAG, true,null,false, new LimitlessCreditManager());
        final int msgCount = 10;
        publishMessages(msgCount);

        _channel.acknowledgeMessage(0, true);
        UnacknowledgedMessageMap map = _channel.getUnacknowledgedMessageMap();
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.flow.LimitlessCreditManager

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.