Package org.mule.util.queue

Examples of org.mule.util.queue.RecoverableQueueStore


            for (LocalQueueTxJournalEntry logEntry : entries)
            {
                if (logEntry.isRemove())
                {
                    String queueName = logEntry.getQueueName();
                    RecoverableQueueStore queue = queueProvider.getRecoveryQueue(queueName);
                    Serializable polledValue = logEntry.getValue();
                    if (!queue.contains(polledValue))
                    {
                        if (logger.isDebugEnabled())
                        {
                            logger.debug("re-adding polled element that was not commited to queue " + queue.getName());
                        }
                        try
                        {
                            queue.putNow(polledValue);
                        }
                        catch (InterruptedException e)
                        {
                            throw new MuleRuntimeException(e);
                        }
                    }
                }
                else if (logEntry.isAdd() || logEntry.isAddFirst())
                {
                    Serializable offeredValue = logEntry.getValue();
                    String queueName = logEntry.getQueueName();
                    RecoverableQueueStore queue = queueProvider.getRecoveryQueue(queueName);
                    if (queue.contains(offeredValue))
                    {
                        if (logger.isDebugEnabled())
                        {
                            logger.debug("removing offer element that was not commited to queue " + queue.getName());
                        }
                        queue.remove(offeredValue);
                    }
                }
            }
        }
        if (logger.isDebugEnabled())
View Full Code Here

TOP

Related Classes of org.mule.util.queue.RecoverableQueueStore

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.