summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2010-04-12 11:55:36 +0100
committerMatthew Sackman <matthew@lshift.net>2010-04-12 11:55:36 +0100
commit2a30a233aeca8fb95a3312ce9c950d1749081144 (patch)
treec04c374f16a9474995d299810a6eb69056f84016 /include
parente71d2d1311d53ea099e83e765c7db64f7407eb9b (diff)
downloadrabbitmq-server-git-2a30a233aeca8fb95a3312ce9c950d1749081144.tar.gz
msg_id => guid in type specs, field names and function names. Vars still todo
Diffstat (limited to 'include')
-rw-r--r--include/rabbit.hrl2
-rw-r--r--include/rabbit_backing_queue_type_spec.hrl4
-rw-r--r--include/rabbit_msg_store.hrl2
-rw-r--r--include/rabbit_msg_store_index.hrl6
4 files changed, 7 insertions, 7 deletions
diff --git a/include/rabbit.hrl b/include/rabbit.hrl
index 4b1be43cda..982d90e909 100644
--- a/include/rabbit.hrl
+++ b/include/rabbit.hrl
@@ -89,7 +89,7 @@
%% this is really an abstract type, but dialyzer does not support them
-type(guid() :: binary()).
--type(msg_id() :: guid()).
+-type(msg_id() :: non_neg_integer()).
-type(txn() :: guid()).
-type(pkey() :: guid()).
-type(r(Kind) ::
diff --git a/include/rabbit_backing_queue_type_spec.hrl b/include/rabbit_backing_queue_type_spec.hrl
index 54118ba640..ac47ccba3d 100644
--- a/include/rabbit_backing_queue_type_spec.hrl
+++ b/include/rabbit_backing_queue_type_spec.hrl
@@ -41,8 +41,8 @@
state()}).
-spec(ack/2 :: ([ack()], state()) -> state()).
-spec(tx_publish/2 :: (basic_message(), state()) -> state()).
--spec(tx_rollback/2 :: ([msg_id()], state()) -> state()).
--spec(tx_commit/4 :: ([msg_id()], [ack()], {pid(), any()}, state()) ->
+-spec(tx_rollback/2 :: ([guid()], state()) -> state()).
+-spec(tx_commit/4 :: ([guid()], [ack()], {pid(), any()}, state()) ->
{boolean(), state()}).
-spec(requeue/2 :: ([{basic_message(), ack()}], state()) -> state()).
-spec(len/1 :: (state()) -> non_neg_integer()).
diff --git a/include/rabbit_msg_store.hrl b/include/rabbit_msg_store.hrl
index 696ccf3cc6..d96fa758bd 100644
--- a/include/rabbit_msg_store.hrl
+++ b/include/rabbit_msg_store.hrl
@@ -38,4 +38,4 @@
-endif.
-record(msg_location,
- {msg_id, ref_count, file, offset, total_size}).
+ {guid, ref_count, file, offset, total_size}).
diff --git a/include/rabbit_msg_store_index.hrl b/include/rabbit_msg_store_index.hrl
index 9b3332eed0..eb0ad5cb68 100644
--- a/include/rabbit_msg_store_index.hrl
+++ b/include/rabbit_msg_store_index.hrl
@@ -43,13 +43,13 @@
-spec(init/2 :: (('fresh'|'recover'), dir()) ->
{'fresh'|'recovered', index_state()}).
--spec(lookup/2 :: (msg_id(), index_state()) -> ('not_found' | keyvalue())).
+-spec(lookup/2 :: (guid(), index_state()) -> ('not_found' | keyvalue())).
-spec(insert/2 :: (keyvalue(), index_state()) -> 'ok').
-spec(update/2 :: (keyvalue(), index_state()) -> 'ok').
--spec(update_fields/3 :: (msg_id(), ({fieldpos(), fieldvalue()} |
+-spec(update_fields/3 :: (guid(), ({fieldpos(), fieldvalue()} |
[{fieldpos(), fieldvalue()}]),
index_state()) -> 'ok').
--spec(delete/2 :: (msg_id(), index_state()) -> 'ok').
+-spec(delete/2 :: (guid(), index_state()) -> 'ok').
-spec(delete_by_file/2 :: (fieldvalue(), index_state()) -> 'ok').
-spec(terminate/1 :: (index_state()) -> any()).