public class LocalTxQueueTransactionContext extends AbstractTransactionContext implements LocalQueueTransactionContext, QueueTransactionContextFactory<LocalQueueTransactionContext>
LocalQueueTransactionContext
implementation for a queue.Constructor and Description |
---|
LocalTxQueueTransactionContext(LocalTxQueueTransactionJournal localTxQueueTransactionJournal,
QueueProvider queueProvider,
Lock transactionContextAccessLock) |
Modifier and Type | Method and Description |
---|---|
void |
clear(QueueStore queue) |
LocalQueueTransactionContext |
createPersistentTransactionContext() |
LocalQueueTransactionContext |
createTransientTransactionContext() |
void |
doCommit()
Commits the current transaction context operations
|
void |
doRollback()
Rollbacks the current transaction context operations
|
boolean |
offer(QueueStore queue,
Serializable item,
long offerTimeout) |
Serializable |
peek(QueueStore queue) |
Serializable |
poll(QueueStore queue,
long pollTimeout) |
int |
size(QueueStore queue) |
void |
untake(QueueStore queue,
Serializable item) |
finalCleanUp, notifyFinish, toString
public LocalTxQueueTransactionContext(LocalTxQueueTransactionJournal localTxQueueTransactionJournal, QueueProvider queueProvider, Lock transactionContextAccessLock)
public LocalQueueTransactionContext createPersistentTransactionContext()
createPersistentTransactionContext
in interface QueueTransactionContextFactory<LocalQueueTransactionContext>
public LocalQueueTransactionContext createTransientTransactionContext()
createTransientTransactionContext
in interface QueueTransactionContextFactory<LocalQueueTransactionContext>
public void doCommit() throws ResourceManagerException
LocalQueueTransactionContext
doCommit
in interface LocalQueueTransactionContext
doCommit
in class AbstractTransactionContext
ResourceManagerException
public void doRollback() throws ResourceManagerException
LocalQueueTransactionContext
doRollback
in interface LocalQueueTransactionContext
doRollback
in class AbstractTransactionContext
ResourceManagerException
public boolean offer(QueueStore queue, Serializable item, long offerTimeout) throws InterruptedException
offer
in interface QueueTransactionContext
InterruptedException
public void untake(QueueStore queue, Serializable item) throws InterruptedException
untake
in interface QueueTransactionContext
InterruptedException
public void clear(QueueStore queue) throws InterruptedException
clear
in interface QueueTransactionContext
InterruptedException
public Serializable poll(QueueStore queue, long pollTimeout) throws InterruptedException
poll
in interface QueueTransactionContext
InterruptedException
public Serializable peek(QueueStore queue) throws InterruptedException
peek
in interface QueueTransactionContext
InterruptedException
public int size(QueueStore queue)
size
in interface QueueTransactionContext
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.