Was this page helpful?

Dequeue Method

    Dequeue()

    public virtual ITransactionalQueueEntry<T> Dequeue();
    Get the next available item from the queue. Must call ITransactionalQueue<T>.CommitDequeue(long id) to fully take possession or the item. Uses ITransactionalQueue<T>.DefaultCommitTimeout.

    Remarks

    Phase 1 of the two-phase dequeue. ITransactionalQueue<T>.CommitDequeue(long id) within ITransactionalQueue<T>.DefaultCommitTimeout completes the dequeue, while waiting for the timeout to expire or calling ITransactionalQueue<T>.RollbackDequeue(long id) aborts the dequeue.

    Parameters

    Name Type Description

    Returns

    An instance of MindTouch.Collections.ITransactionalQueueEntry<T> wrapping the dequeued value and item id for use with ITransactionalQueue<T>.CommitDequeue(long id) or ITransactionalQueue<T>.RollbackDequeue(long id). null if the queue is empty.

    Dequeue(TimeSpan commitTimeout)

    public virtual ITransactionalQueueEntry<T> Dequeue(TimeSpan commitTimeout);
    Get the next available item from the queue. Must call ITransactionalQueue<T>.CommitDequeue(long id) to fully take possession or the item.

    Remarks

    Phase 1 of the two-phase dequeue. ITransactionalQueue<T>.CommitDequeue(long id) within commitTimeout completes the dequeue, while waiting for the timeout to expire or calling ITransactionalQueue<T>.RollbackDequeue(long id) aborts the dequeue.

    Parameters

    Name Type Description
    commitTimeout TimeSpan Time before an uncommitted dequeue is considered abandoned and automatically rolled back

    Returns

    An instance of MindTouch.Collections.ITransactionalQueueEntry<T> wrapping the dequeued value and item id for use with ITransactionalQueue<T>.CommitDequeue(long id) or ITransactionalQueue<T>.RollbackDequeue(long id). null if the queue is empty.
    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by