diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2011-01-23 18:56:51 +0000 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2011-01-23 18:56:51 +0000 |
commit | 1d50f8c007729875efdab3fa4d02faa11f5e4812 (patch) | |
tree | 99a91448f5a0adf7c744536c54b47b5bbd48ae1a /include/rabbit_backing_queue_spec.hrl | |
parent | 84ecc484e583b674e09ea8928ef3a187101a0225 (diff) | |
download | rabbitmq-server-1d50f8c007729875efdab3fa4d02faa11f5e4812.tar.gz |
dependently type acktag producing functions
s.t. the "blank ack" case is manifest
Switched from blank_ack to the more universal 'undefined' in the process.
Diffstat (limited to 'include/rabbit_backing_queue_spec.hrl')
-rw-r--r-- | include/rabbit_backing_queue_spec.hrl | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/include/rabbit_backing_queue_spec.hrl b/include/rabbit_backing_queue_spec.hrl index 296bfdb3..accb2c0e 100644 --- a/include/rabbit_backing_queue_spec.hrl +++ b/include/rabbit_backing_queue_spec.hrl @@ -14,14 +14,13 @@ %% Copyright (c) 2007-2011 VMware, Inc. All rights reserved. %% --type(fetch_result() :: +-type(fetch_result(Ack) :: ('empty' | %% Message, IsDelivered, AckTag, Remaining_Len - {rabbit_types:basic_message(), boolean(), ack(), non_neg_integer()})). + {rabbit_types:basic_message(), boolean(), Ack, non_neg_integer()})). -type(is_durable() :: boolean()). -type(attempt_recovery() :: boolean()). -type(purged_msg_count() :: non_neg_integer()). --type(ack_required() :: boolean()). -type(confirm_required() :: boolean()). -type(message_properties_transformer() :: fun ((rabbit_types:message_properties()) @@ -36,13 +35,17 @@ -spec(purge/1 :: (state()) -> {purged_msg_count(), state()}). -spec(publish/3 :: (rabbit_types:basic_message(), rabbit_types:message_properties(), state()) -> state()). --spec(publish_delivered/4 :: (ack_required(), rabbit_types:basic_message(), +-spec(publish_delivered/4 :: (true, rabbit_types:basic_message(), rabbit_types:message_properties(), state()) - -> {ack(), state()}). + -> {ack(), state()}; + (false, rabbit_types:basic_message(), + rabbit_types:message_properties(), state()) + -> {undefined, state()}). -spec(dropwhile/2 :: (fun ((rabbit_types:message_properties()) -> boolean()), state()) -> state()). --spec(fetch/2 :: (ack_required(), state()) -> {fetch_result(), state()}). +-spec(fetch/2 :: (true, state()) -> {fetch_result(ack()), state()}; + (false, state()) -> {fetch_result(undefined), state()}). -spec(ack/2 :: ([ack()], state()) -> state()). -spec(tx_publish/4 :: (rabbit_types:txn(), rabbit_types:basic_message(), rabbit_types:message_properties(), state()) -> state()). |