Package org.apache.qpid.server.store

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


        _state = TransactionState.ABORTED;
    }

    public static TransactionLog createTestTransactionLog(final MockStoreTransaction storeTransaction)
    {
        return new TransactionLog()
        {
            public void configureTransactionLog(String name, TransactionLogRecoveryHandler recoveryHandler,
                    Configuration storeConfiguration, LogSubject logSubject) throws Exception
            {
            }
View Full Code Here


                public String getResourceName()
                {
                    return queueName.asString();
                }
            };
            TransactionLog log = (TransactionLog) store;
            TransactionLog.Transaction txn = log.newTransaction();
            txn.enqueueMessage(mockQueue, messageId);
            txn.commitTran();
        }
        finally
        {
View Full Code Here

     * in the TransactionLog interface implemented by the store, and verifying the
     * behaviour using BDB implementation methods.
     */
    public void testTranCommit() throws Exception
    {
        TransactionLog log = getVirtualHost().getTransactionLog();

        BDBMessageStore bdbStore = assertBDBStore(log);

        final AMQShortString mockQueueName = new AMQShortString("queueName");
       
        TransactionLogResource mockQueue = new TransactionLogResource()
        {
            public String getResourceName()
            {
                return mockQueueName.asString();
            }
        };
       
        TransactionLog.Transaction txn = log.newTransaction();
       
        txn.enqueueMessage(mockQueue, 1L);
        txn.enqueueMessage(mockQueue, 5L);
        txn.commitTran();

View Full Code Here

     * implemented by the store, and verifying the behaviour using BDB
     * implementation methods.
     */
    public void testTranRollbackBeforeCommit() throws Exception
    {
        TransactionLog log = getVirtualHost().getTransactionLog();

        BDBMessageStore bdbStore = assertBDBStore(log);

        final AMQShortString mockQueueName = new AMQShortString("queueName");
       
        TransactionLogResource mockQueue = new TransactionLogResource()
        {
            public String getResourceName()
            {
                return mockQueueName.asString();
            }
        };
       
        TransactionLog.Transaction txn = log.newTransaction();
       
        txn.enqueueMessage(mockQueue, 21L);
        txn.abortTran();
       
        txn = log.newTransaction();
        txn.enqueueMessage(mockQueue, 22L);
        txn.enqueueMessage(mockQueue, 23L);
        txn.commitTran();

        List<Long> enqueuedIds = bdbStore.getEnqueuedMessages(mockQueueName);
View Full Code Here

     * implemented by the store, and verifying the behaviour using BDB
     * implementation methods.
     */
    public void testTranRollbackAfterCommit() throws Exception
    {
        TransactionLog log = getVirtualHost().getTransactionLog();

        BDBMessageStore bdbStore = assertBDBStore(log);

        final AMQShortString mockQueueName = new AMQShortString("queueName");
       
        TransactionLogResource mockQueue = new TransactionLogResource()
        {
            public String getResourceName()
            {
                return mockQueueName.asString();
            }
        };
       
        TransactionLog.Transaction txn = log.newTransaction();
       
        txn.enqueueMessage(mockQueue, 30L);
        txn.commitTran();

        txn = log.newTransaction();
        txn.enqueueMessage(mockQueue, 31L);
        txn.abortTran();
       
        txn = log.newTransaction();
        txn.enqueueMessage(mockQueue, 32L);
        txn.commitTran();
       
        List<Long> enqueuedIds = bdbStore.getEnqueuedMessages(mockQueueName);
       
View Full Code Here

        _state = TransactionState.ABORTED;
    }

    public static TransactionLog createTestTransactionLog(final MockStoreTransaction storeTransaction)
    {
        return new TransactionLog()
        {
   
            @Override
            public void configureTransactionLog(String name, TransactionLogRecoveryHandler recoveryHandler,
                    Configuration storeConfiguration, LogSubject logSubject) throws Exception
View Full Code Here

TOP

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

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.