org.d_haven.event

Interface PreparedEnqueue

public interface PreparedEnqueue

A PreparedEnqueue is an object returned from a prepareEnqueue method that allows you to either commit or abort the enqueue operation.

Author: Berin Loritsch

Method Summary
voidabort()
Abort a previously prepared provisional enqueue operation (from the prepareEnqueue method).
voidcommit()
Commit a previously prepared provisional enqueue operation (from the prepareEnqueue method).

Method Detail

abort

public void abort()
Abort a previously prepared provisional enqueue operation (from the prepareEnqueue method). Causes the queue to discard the provisionally enqueued elements.

commit

public void commit()
Commit a previously prepared provisional enqueue operation (from the prepareEnqueue method). Causes the provisionally enqueued elements to appear on the queue for future dequeue operations. Note that once a prepareEnqueue has returned an enqueue key, the queue cannot reject the entries.