Package org.apache.qpid.server.txn

Examples of org.apache.qpid.server.txn.AutoCommitTransaction


            // The send may of course still fail, in which case, as
            // the message is unacked, it will be lost.
            if(_txn == null)
            {
                _txn = new AutoCommitTransaction(getQueue().getVirtualHost().getMessageStore());
            }
            _txn.dequeue(getQueue(), entry.getMessage(), NOOP);

            entry.dequeue();
View Full Code Here


        }
    }

    private void forceDequeue(final QueueEntry entry, final boolean restoreCredit)
    {
        AutoCommitTransaction dequeueTxn = new AutoCommitTransaction(getQueue().getVirtualHost().getMessageStore());
        dequeueTxn.dequeue(entry.getQueue(), entry.getMessage(),
                           new ServerTransaction.Action()
                           {
                               public void postCommit()
                               {
                                   if (restoreCredit)
View Full Code Here

            ArrayList<AMQQueue> qs = new ArrayList<AMQQueue>();
            qs.add(_queue);
            MessageMetaData mmd = new MessageMetaData(publishBody,cb, System.currentTimeMillis());
            final StoredMessage storedMessage = _messageStore.addMessage(mmd);
            final AMQMessage message = new AMQMessage(storedMessage);
            ServerTransaction txn = new AutoCommitTransaction(_messageStore);
            txn.enqueue(_queue, message,
                        new ServerTransaction.Action()
                        {
                            public void postCommit()
                            {
                                _queue.enqueue(message,null);
View Full Code Here

        }
    }

    private void forceDequeue(final QueueEntry entry, final boolean restoreCredit)
    {
        ServerTransaction txn = new AutoCommitTransaction(getQueue().getVirtualHost().getTransactionLog());
        txn.dequeue(entry.getQueue(),entry.getMessage(),
                                new ServerTransaction.Action()
                            {
                                public void postCommit()
                                {
                                    if(restoreCredit)
View Full Code Here

        return count;
    }

    private void dequeueEntry(final QueueEntry node)
    {
        ServerTransaction txn = new AutoCommitTransaction(getVirtualHost().getTransactionLog());
        dequeueEntry(node, txn);
    }
View Full Code Here

    public ServerSession(Connection connection, SessionDelegate delegate, Binary name, long expiry, ConnectionConfig connConfig)
    {
        super(connection, delegate, name, expiry);
        _connectionConfig = connConfig;       
        _transaction = new AutoCommitTransaction(this.getMessageStore());
        _principal = new UserPrincipal(connection.getAuthorizationID());
        _reference = new WeakReference<Session>(this);
        _id = getConfigStore().createId();
        getConfigStore().addConfiguredObject(this);
    }
View Full Code Here

        getConfigStore().addConfiguredObject(this);

        _messageStore = messageStore;

        // by default the session is non-transactional
        _transaction = new AutoCommitTransaction(_messageStore);
    }
View Full Code Here

        MessageMetaData metaData = msg.headersReceived();
        StoredMessage handle = _store.addMessage(metaData);
        msg.setStoredMessage(handle);


        ServerTransaction txn = new AutoCommitTransaction(_store);

        txn.enqueue(qs, msg, new ServerTransaction.Action()
                                    {
                                        public void postCommit()
                                        {
                                            msg.enqueue(qs);
                                        }
View Full Code Here


        // check and deliver if header says body length is zero
        if (currentMessage.allContentReceived())
        {
            ServerTransaction trans = new AutoCommitTransaction(getVirtualHost().getMessageStore());
            final List<? extends BaseQueue> destinationQueues = currentMessage.getDestinationQueues();
            trans.enqueue(currentMessage.getDestinationQueues(), currentMessage, new ServerTransaction.Action() {
                public void postCommit()
                {
                    try
                    {
                        AMQMessage message = new AMQMessage(currentMessage.getStoredMessage());
View Full Code Here

    public ServerSession(Connection connection, SessionDelegate delegate, Binary name, long expiry, ConnectionConfig connConfig)
    {
        super(connection, delegate, name, expiry);
        _connectionConfig = connConfig;       
        _transaction = new AutoCommitTransaction(this.getMessageStore());

        _reference = new WeakReference<Session>(this);
        _id = getConfigStore().createId();
        getConfigStore().addConfiguredObject(this);
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.txn.AutoCommitTransaction

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.