Package org.apache.qpid.server.store

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


    {
        for (int i = 0 ; i < 5; i++)
        {
            // Create message
            Long messageId = new Long(i);
            AMQMessage message = new TestMessage(messageId, messageId, info, new StoreContext());
            // Put message on queue
            _queue.enqueue(null, message);
        }
        // Get message ids
        List<Long> msgids = _queue.getMessagesOnTheQueue(5);
View Full Code Here


    {
        for (int i = 0 ; i < 10; i++)
        {
            // Create message
            Long messageId = new Long(i);
            AMQMessage message = new TestMessage(messageId, messageId, info, new StoreContext());
            // Put message on queue
            _queue.enqueue(null, message);
        }
        // Get message ids
        List<Long> msgids = _queue.getMessagesOnTheQueue(5, 5);
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

        //Set values from configuration
        Configurator.configure(this);

        _session = session;
        _channelId = channelId;
        _storeContext = new StoreContext("Session: " + session.getClientIdentifier() + "; channel: " + channelId);


        _messageStore = messageStore;

        // by default the session is non-transactional
View Full Code Here

    public void setUp() throws AMQException
    {
        _exchange = new TopicExchange();
        _vhost = ApplicationRegistry.getInstance().getVirtualHostRegistry().getVirtualHosts().iterator().next();
        _store = new MemoryMessageStore();
        _context = new StoreContext();
        _protocolSession = new InternalTestProtocolSession();
    }
View Full Code Here

         * @throws AMQException
         */
        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

        {
            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

                                                                                                       _messageStore,
                                                                                                       true);

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

    public void setUp() throws AMQException
    {
        _exchange = new DestWildExchange();
        _vhost = ApplicationRegistry.getInstance().getVirtualHostRegistry().getVirtualHosts().iterator().next();
        _store = new MemoryMessageStore();
        _context = 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.