summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRob Harrop <rob@rabbitmq.com>2011-06-13 12:02:58 +0100
committerRob Harrop <rob@rabbitmq.com>2011-06-13 12:02:58 +0100
commit9aae97b137bb3e5e7f98f0b59c41061577f39fdd (patch)
tree39f529e8ef42f5abfa71e87f0755514a931772d4 /include
parent76552918fd0e8636eee8087204e1a169f3a9c66e (diff)
downloadrabbitmq-server-git-9aae97b137bb3e5e7f98f0b59c41061577f39fdd.tar.gz
Updated specs and fixed error in ack that didn't account for different ack storage formats
Diffstat (limited to 'include')
-rw-r--r--include/rabbit_backing_queue_spec.hrl15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/rabbit_backing_queue_spec.hrl b/include/rabbit_backing_queue_spec.hrl
index 295d90394f..cc7cca04e6 100644
--- a/include/rabbit_backing_queue_spec.hrl
+++ b/include/rabbit_backing_queue_spec.hrl
@@ -28,6 +28,13 @@
-type(async_callback() :: fun ((atom(), fun ((atom(), state()) -> state())) -> 'ok')).
-type(sync_callback() :: fun ((atom(), fun ((atom(), state()) -> state())) -> 'ok' | 'error')).
+-type(msg_lookup_result() :: {rabbit_types:basic_message(), {any(), state()}}).
+
+-type(msg_lookup_fun() :: fun((any(), state()) -> msg_lookup_result())).
+
+-type(msg_lookup_callback() ::
+ fun((msg_lookup_fun(), {any(), state()}) -> {any(), state()})).
+
-spec(start/1 :: ([rabbit_amqqueue:name()]) -> 'ok').
-spec(stop/0 :: () -> 'ok').
-spec(init/4 :: (rabbit_types:amqqueue(), attempt_recovery(),
@@ -45,12 +52,14 @@
rabbit_types:message_properties(), pid(), state())
-> {undefined, state()}).
-spec(drain_confirmed/1 :: (state()) -> {[rabbit_guid:guid()], state()}).
--spec(dropwhile/2 ::
- (fun ((rabbit_types:message_properties()) -> boolean()), state())
+-spec(dropwhile/3 ::
+ (fun ((rabbit_types:message_properties()) -> boolean()),
+ msg_lookup_callback(), state())
-> state()).
-spec(fetch/2 :: (true, state()) -> {fetch_result(ack()), state()};
(false, state()) -> {fetch_result(undefined), state()}).
--spec(ack/2 :: ([ack()], state()) -> {[rabbit_guid:guid()], state()}).
+-spec(ack/3 :: ([ack()], msg_lookup_callback(), state()) ->
+ {[rabbit_guid:guid()], state()}).
-spec(tx_publish/5 :: (rabbit_types:txn(), rabbit_types:basic_message(),
rabbit_types:message_properties(), pid(), state()) ->
state()).