summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2010-04-16 11:14:08 +0100
committerMatthew Sackman <matthew@lshift.net>2010-04-16 11:14:08 +0100
commitdb0f89ea5aa1167479c6b0d89a7536aaf9efca86 (patch)
treeb947fc534a57ab75e037959c204eed5abd882adc /include
parent15164b641ea8fa5900a8d9eae81c74d250f81f67 (diff)
downloadrabbitmq-server-db0f89ea5aa1167479c6b0d89a7536aaf9efca86.tar.gz
Thorough reworking of API - the BQ is now responsible for hanging onto unacked msgs and all details of transactions
Diffstat (limited to 'include')
-rw-r--r--include/rabbit_backing_queue_spec.hrl21
1 files changed, 12 insertions, 9 deletions
diff --git a/include/rabbit_backing_queue_spec.hrl b/include/rabbit_backing_queue_spec.hrl
index 3a0f701b..d86a5382 100644
--- a/include/rabbit_backing_queue_spec.hrl
+++ b/include/rabbit_backing_queue_spec.hrl
@@ -29,22 +29,25 @@
%% Contributor(s): ______________________________________.
%%
+-type(fetch_result() ::
+ %% Message, IsDelivered, AckTag, Remaining_Len
+ ('empty'|{basic_message(), boolean(), ack(), non_neg_integer()})).
+
-spec(start/1 :: ([queue_name()]) -> 'ok').
-spec(init/2 :: (queue_name(), boolean()) -> state()).
-spec(terminate/1 :: (state()) -> state()).
-spec(delete_and_terminate/1 :: (state()) -> state()).
-spec(purge/1 :: (state()) -> {non_neg_integer(), state()}).
-spec(publish/2 :: (basic_message(), state()) -> state()).
--spec(publish_delivered/2 :: (basic_message(), state()) -> {ack(), state()}).
--spec(fetch/1 :: (state()) ->
- {('empty'|{basic_message(), boolean(), ack(), non_neg_integer()}),
- state()}).
+-spec(publish_delivered/3 ::
+ (boolean(), basic_message(), state()) -> {ack(), state()}).
+-spec(fetch/2 :: (boolean(), state()) -> {fetch_result(), state()}).
-spec(ack/2 :: ([ack()], state()) -> state()).
--spec(tx_publish/2 :: (basic_message(), state()) -> state()).
--spec(tx_rollback/2 :: ([guid()], state()) -> state()).
--spec(tx_commit/4 :: ([basic_message()], [ack()], {pid(), any()}, state()) ->
- {boolean(), state()}).
--spec(requeue/2 :: ([{basic_message(), ack()}], state()) -> state()).
+-spec(tx_publish/3 :: (txn(), basic_message(), state()) -> state()).
+-spec(tx_ack/3 :: (txn(), [ack()], state()) -> state()).
+-spec(tx_rollback/2 :: (txn(), state()) -> {[ack()], state()}).
+-spec(tx_commit/3 :: (txn(), {pid(), any()}, state()) -> {[ack()], state()}).
+-spec(requeue/2 :: ([ack()], state()) -> state()).
-spec(len/1 :: (state()) -> non_neg_integer()).
-spec(is_empty/1 :: (state()) -> boolean()).
-spec(set_ram_duration_target/2 ::