summaryrefslogtreecommitdiff
path: root/src/rabbit_runtime_parameters.erl
diff options
context:
space:
mode:
authorEmile Joubert <emile@rabbitmq.com>2012-10-12 00:11:40 +0100
committerEmile Joubert <emile@rabbitmq.com>2012-10-12 00:11:40 +0100
commit1b70aae6aadbc36641b3362d79f0cfcb8cc6a723 (patch)
tree46098081070e9f5a5a7fcad4843f98460250764c /src/rabbit_runtime_parameters.erl
parent4570c679cd6f33fc38e5be9af9a2a8ace3c365a2 (diff)
downloadrabbitmq-server-1b70aae6aadbc36641b3362d79f0cfcb8cc6a723.tar.gz
Remove hints, spaces
Diffstat (limited to 'src/rabbit_runtime_parameters.erl')
-rw-r--r--src/rabbit_runtime_parameters.erl23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/rabbit_runtime_parameters.erl b/src/rabbit_runtime_parameters.erl
index c2031759..564ffeea 100644
--- a/src/rabbit_runtime_parameters.erl
+++ b/src/rabbit_runtime_parameters.erl
@@ -18,7 +18,6 @@
-include("rabbit.hrl").
-
-export([parse_set_param/4, set_param/4,
parse_set_policy/4, parse_set_policy/5, set_policy/4, set_policy/5,
clear_param/3, clear_policy/2,
@@ -82,8 +81,6 @@
%%---------------------------------------------------------------------------
-% used by rabbit_control_main
-
parse_set_param(_, <<"policy">>, _, _) ->
{error_string, "policies may not be set using this method"};
parse_set_param(VHost, Component, Key, String) ->
@@ -93,8 +90,6 @@ parse_set_param(VHost, Component, Key, String) ->
error -> {error_string, "JSON decoding error"}
end.
-% used by management plugin tests and rabbit_mgmt_wm_parameter
-
set_param(_, <<"policy">>, _, _) ->
{error_string, "policies may not be set using this method"};
set_param(VHost, Component, Key, Term) ->
@@ -103,9 +98,6 @@ set_param(VHost, Component, Key, Term) ->
{errors, L} -> format_error(L)
end.
-
-% used by rabbit_control_main
-
parse_set_policy(VHost, Key, Pat, Defn) ->
parse_set_policy0(VHost, Key, Pat, Defn, []).
parse_set_policy(VHost, Key, Pat, Defn, Priority) ->
@@ -126,8 +118,6 @@ parse_set_policy0(VHost, Key, Pattern, Defn, Priority) ->
{error_string, "JSON decoding error"}
end.
-% used by management plugin
-
set_policy(VHost, Key, Pattern, Defn) ->
set_policy0(VHost, Key, policy_values(Pattern, Defn)).
set_policy(VHost, Key, Pattern, Defn, Priority) ->
@@ -137,8 +127,6 @@ set_policy(VHost, Key, Pattern, Defn, Priority) ->
policy_values(Pattern, Defn) ->
[{<<"pattern">>, Pattern}, {<<"policy">>, Defn}].
-% common, used by both parameters and policies
-
set_policy0(VHost, Key, Term) ->
case set0(VHost, <<"policy">>, Key, Term) of
ok -> ok;
@@ -209,8 +197,6 @@ mnesia_clear(VHost, Component, Key) ->
%%---------------------------------------------------------------------------
-% used by broker internally (rabbit_vhost)
-
list_param() ->
[p(P) || #runtime_parameters{ key = {_VHost, Comp, _Key}} = P <-
rabbit_misc:dirty_read_all(?TABLE), Comp /= <<"policy">>].
@@ -230,16 +216,12 @@ list_param(VHost, Component, Default) ->
_ -> Default
end.
-% used by management plugin REST interface
-
list_policies() ->
list_policies('_').
list_policies(VHost) ->
list_policies0(VHost, fun ident/1).
-% used by rabbit_control_main
-
list_formatted_param(VHost) ->
[pset(value, format(pget(value, P)), P) || P <- list_param(VHost)].
@@ -254,16 +236,12 @@ order_policies(PropList) ->
lists:sort(fun (A, B) -> pget(priority, A, 0) < pget(priority, B, 0) end,
PropList).
-% used by rabbit_policy
-
list_policies_raw(VHost) ->
Match = #runtime_parameters{key = {VHost, <<"policy">>, '_'}, _ = '_'},
[p(P) || P <- mnesia:dirty_match_object(?TABLE, Match)].
%%---------------------------------------------------------------------------
-% used by management plugin (rabbit_mgmt_wm_policy and _parameter)
-
lookup_param(VHost, Component, Key) ->
case lookup0(VHost, Component, Key, rabbit_misc:const(not_found)) of
not_found -> not_found;
@@ -360,4 +338,3 @@ flatten_errors(L) ->
[] -> ok;
E -> {errors, E}
end.
-