summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2010-04-29 16:30:03 +0100
committerMatthew Sackman <matthew@lshift.net>2010-04-29 16:30:03 +0100
commit4294a16ee355d5745db53e5198e517c8635eace7 (patch)
tree4df8afa3a386d739acee3f7350e51de25643590a /src
parentbfd6d1e53778ef710b2bbede50c880de551ecd89 (diff)
downloadrabbitmq-server-git-4294a16ee355d5745db53e5198e517c8635eace7.tar.gz
More meaningful specs for the backing queue, and removal of duplicated and potentially divergent documentation with the specs
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_backing_queue.erl20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/rabbit_backing_queue.erl b/src/rabbit_backing_queue.erl
index f21c290f05..38bee4663b 100644
--- a/src/rabbit_backing_queue.erl
+++ b/src/rabbit_backing_queue.erl
@@ -42,12 +42,10 @@ behaviour_info(callbacks) ->
%% shared resources.
{start, 1},
- %% Called with queue name, a boolean to indicate whether or
- %% not the queue is durable, and a boolean to indicate whether
- %% the queue contents should be attempted to be recovered.
+ %% Initialise the backing queue and its state.
{init, 3},
- %% Called on queue shutdown when queue isn't being deleted
+ %% Called on queue shutdown when queue isn't being deleted.
{terminate, 1},
%% Called when the queue is terminating and needs to delete all
@@ -58,7 +56,7 @@ behaviour_info(callbacks) ->
%% been fetched and are pending acks.
{purge, 1},
- %% Publish a message
+ %% Publish a message.
{publish, 2},
%% Called for messages which have already been passed straight
@@ -66,11 +64,11 @@ behaviour_info(callbacks) ->
%% (i.e. saves the round trip through the backing queue).
{publish_delivered, 3},
- %% Produce the next message
+ %% Produce the next message.
{fetch, 2},
%% Acktags supplied are for messages which can now be forgotten
- %% about
+ %% about.
{ack, 2},
%% A publish, but in the context of a transaction.
@@ -118,12 +116,12 @@ behaviour_info(callbacks) ->
{ram_duration, 1},
%% Can return 'undefined' or a thunk which will receive the
- %% state, and must return the state, as soon as the queue process
- %% can manage (either on an empty mailbox, or when a timer
- %% fires).
+ %% state, and must return the state, which will be invoked as
+ %% soon as the queue process can manage (either on an empty
+ %% mailbox, or when a timer fires).
{sync_callback, 1},
- %% Called immediately before the queue hibernates
+ %% Called immediately before the queue hibernates.
{handle_pre_hibernate, 1},
%% Exists for debugging purposes, to be able to expose state via