Package org.apache.qpid.server.store

Examples of org.apache.qpid.server.store.StoreContext


        ByteBuffer deliver = createEncodedDeliverFrame(message, channelId, deliveryTag, consumerTag);
        AMQDataBlock contentHeader = ContentHeaderBody.createAMQFrame(channelId,
                                                                      message.getContentHeaderBody());

        final AMQMessageHandle messageHandle = message.getMessageHandle();
        final StoreContext storeContext = message.getStoreContext();
        final Long messageId = message.getMessageId();

        final int bodyCount = messageHandle.getBodyCount(storeContext,messageId);

        if(bodyCount == 0)
View Full Code Here


    public void writeGetOk(AMQMessage message, int channelId, long deliveryTag, int queueSize) throws AMQException
    {

        final AMQMessageHandle messageHandle = message.getMessageHandle();
        final StoreContext storeContext = message.getStoreContext();
        final long messageId = message.getMessageId();

        ByteBuffer deliver = createEncodedGetOkFrame(message, channelId, deliveryTag, queueSize);

View Full Code Here

    public AMQChannel(AMQProtocolSession session, int channelId, MessageStore messageStore, MessageRouter exchanges)
        throws AMQException
    {
        _session = session;
        _channelId = channelId;
        _storeContext = new StoreContext("Session: " + session.getClientIdentifier() + "; channel: " + channelId);
        _prefetch_HighWaterMark = DEFAULT_PREFETCH;
        _prefetch_LowWaterMark = _prefetch_HighWaterMark / 2;
        _messageStore = messageStore;
        _exchanges = exchanges;
        // by default the session is non-transactional
View Full Code Here

         */
        @Override
        public void send(QueueEntry entry) throws AMQException
        {

            StoreContext storeContext = getChannel().getStoreContext();
            try
            { // if we do not need to wait for client acknowledgements
                // we can decrement the reference count immediately.

                // By doing this _before_ the send we ensure that it
View Full Code Here

                                                                                                       _messageStore,
                                                                                                       true);

            try
            {
                amqMessageHandle.setPublishAndContentHeaderBody(new StoreContext(),publish,header);
            }
            catch (AMQException e)
            {
               
            }
View Full Code Here

        {
            if (!node.isAcquired() && !node.isDeleted() && node.expired())
            {
                if (node.acquire())
                {
                    final StoreContext reapingStoreContext = new StoreContext();
                    node.discard(reapingStoreContext);
                }
            }
            QueueEntry newNode = _entries.next(node);
            if (newNode != null)
View Full Code Here

    }

    public void removeExpiredIfNoSubscribers() throws AMQException
    {

        final StoreContext storeContext = new StoreContext();

        QueueEntryIterator queueListIterator = _entries.iterator();

        while (queueListIterator.advance())
        {
View Full Code Here

        final AMQMessageHandle amqMessageHandle = (new MessageHandleFactory()).createMessageHandle(messageId,
                                                                                                   null,
                                                                                                   false);
        try
        {
            amqMessageHandle.setPublishAndContentHeaderBody(new StoreContext(),
                                                              publishBody,
                                                              new ContentHeaderBody()
            {
                public int getSize()
                {
View Full Code Here

                        return null;
                    }
                };

                TestMessage message = new TestMessage(deliveryTag, i, info, txnContext.getStoreContext());
                _map.add(deliveryTag, queue.enqueue(new StoreContext(), message));
            }
            _acked = acked;
            _unacked = unacked;
        }
View Full Code Here

        }
    }

    public void clearStoreContext()
    {
        _storeContext = new StoreContext();
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.store.StoreContext

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.