diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/rabbit.hrl | 8 | ||||
| -rw-r--r-- | include/rabbit_backing_queue_type_spec.hrl (renamed from include/rabbit_internal_queue_type_spec.hrl) | 8 | ||||
| -rw-r--r-- | include/rabbit_msg_store.hrl | 6 | ||||
| -rw-r--r-- | include/rabbit_variable_queue.hrl | 33 |
4 files changed, 44 insertions, 11 deletions
diff --git a/include/rabbit.hrl b/include/rabbit.hrl index 35134ee7bc..d3c9ffee4b 100644 --- a/include/rabbit.hrl +++ b/include/rabbit.hrl @@ -84,9 +84,8 @@ -type(info_key() :: atom()). -type(info() :: {info_key(), any()}). -type(regexp() :: binary()). --type(file_path() :: any()). +-type(file_path() :: string()). -type(io_device() :: any()). --type(file_open_mode() :: any()). %% this is really an abstract type, but dialyzer does not support them -type(guid() :: binary()). @@ -170,8 +169,6 @@ explanation :: string(), method :: atom()}). --type(msg() :: any()). - -endif. %%---------------------------------------------------------------------------- @@ -181,9 +178,6 @@ -define(MAX_WAIT, 16#ffffffff). --define(PERSISTENT_MSG_STORE, msg_store_persistent). --define(TRANSIENT_MSG_STORE, msg_store_transient). - -define(HIBERNATE_AFTER_MIN, 1000). -define(DESIRED_HIBERNATE, 10000). diff --git a/include/rabbit_internal_queue_type_spec.hrl b/include/rabbit_backing_queue_type_spec.hrl index ec120f2438..836e220bf7 100644 --- a/include/rabbit_internal_queue_type_spec.hrl +++ b/include/rabbit_backing_queue_type_spec.hrl @@ -29,7 +29,7 @@ %% Contributor(s): ______________________________________. %% --spec(init/2 :: (queue_name(), pid() | atom()) -> state()). +-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()}). @@ -46,10 +46,10 @@ -spec(requeue/2 :: ([{basic_message(), ack()}], state()) -> state()). -spec(len/1 :: (state()) -> non_neg_integer()). -spec(is_empty/1 :: (state()) -> boolean()). --spec(set_queue_duration_target/2 :: +-spec(set_ram_duration_target/2 :: (('undefined' | 'infinity' | number()), state()) -> state()). --spec(remeasure_rates/1 :: (state()) -> state()). --spec(queue_duration/1 :: (state()) -> number()). +-spec(update_ram_duration/1 :: (state()) -> state()). +-spec(ram_duration/1 :: (state()) -> number()). -spec(needs_sync/1 :: (state()) -> ('undefined' | {atom(), [any()]})). -spec(handle_pre_hibernate/1 :: (state()) -> state()). -spec(status/1 :: (state()) -> [{atom(), any()}]). diff --git a/include/rabbit_msg_store.hrl b/include/rabbit_msg_store.hrl index 112588f38b..696ccf3cc6 100644 --- a/include/rabbit_msg_store.hrl +++ b/include/rabbit_msg_store.hrl @@ -31,5 +31,11 @@ -include("rabbit.hrl"). +-ifdef(use_specs). + +-type(msg() :: any()). + +-endif. + -record(msg_location, {msg_id, ref_count, file, offset, total_size}). diff --git a/include/rabbit_variable_queue.hrl b/include/rabbit_variable_queue.hrl new file mode 100644 index 0000000000..2e43a8fa77 --- /dev/null +++ b/include/rabbit_variable_queue.hrl @@ -0,0 +1,33 @@ +%% The contents of this file are subject to the Mozilla Public License +%% Version 1.1 (the "License"); you may not use this file except in +%% compliance with the License. You may obtain a copy of the License at +%% http://www.mozilla.org/MPL/ +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +%% License for the specific language governing rights and limitations +%% under the License. +%% +%% The Original Code is RabbitMQ. +%% +%% The Initial Developers of the Original Code are LShift Ltd, +%% Cohesive Financial Technologies LLC, and Rabbit Technologies Ltd. +%% +%% Portions created before 22-Nov-2008 00:00:00 GMT by LShift Ltd, +%% Cohesive Financial Technologies LLC, or Rabbit Technologies Ltd +%% are Copyright (C) 2007-2008 LShift Ltd, Cohesive Financial +%% Technologies LLC, and Rabbit Technologies Ltd. +%% +%% Portions created by LShift Ltd are Copyright (C) 2007-2010 LShift +%% Ltd. Portions created by Cohesive Financial Technologies LLC are +%% Copyright (C) 2007-2010 Cohesive Financial Technologies +%% LLC. Portions created by Rabbit Technologies Ltd are Copyright +%% (C) 2007-2010 Rabbit Technologies Ltd. +%% +%% All Rights Reserved. +%% +%% Contributor(s): ______________________________________. +%% + +-define(PERSISTENT_MSG_STORE, msg_store_persistent). +-define(TRANSIENT_MSG_STORE, msg_store_transient). |
