summaryrefslogtreecommitdiff
path: root/src/rabbit_channel.erl
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2011-05-19 12:04:27 +0100
committerSimon MacMullen <simon@rabbitmq.com>2011-05-19 12:04:27 +0100
commita0588a3cdf4f5c56ea7d1c845c21ecdeaa0ae76f (patch)
tree62a87b9f19f4bf0f15f37b63b8d380b0d8262311 /src/rabbit_channel.erl
parent1e2c482d34e80270518e58311105772763df730e (diff)
downloadrabbitmq-server-a0588a3cdf4f5c56ea7d1c845c21ecdeaa0ae76f.tar.gz
rabbitmqctl refresh_channel_config
Diffstat (limited to 'src/rabbit_channel.erl')
-rw-r--r--src/rabbit_channel.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 2517528a..301efb43 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -23,7 +23,7 @@
-export([start_link/10, do/2, do/3, flush/1, shutdown/1]).
-export([send_command/2, deliver/4, flushed/2, confirm/2]).
-export([list/0, info_keys/0, info/1, info/2, info_all/0, info_all/1]).
--export([emit_stats/1, ready_for_close/1]).
+-export([emit_stats/1, ready_for_close/1, refresh_config_all/0]).
-export([init/1, terminate/2, code_change/3, handle_call/3, handle_cast/2,
handle_info/2, handle_pre_hibernate/1, prioritise_call/3,
@@ -89,6 +89,7 @@
-spec(info/2 :: (pid(), rabbit_types:info_keys()) -> rabbit_types:infos()).
-spec(info_all/0 :: () -> [rabbit_types:infos()]).
-spec(info_all/1 :: (rabbit_types:info_keys()) -> [rabbit_types:infos()]).
+-spec(refresh_config_all/0 :: () -> 'ok').
-spec(emit_stats/1 :: (pid()) -> 'ok').
-spec(ready_for_close/1 :: (pid()) -> 'ok').
@@ -146,6 +147,11 @@ info_all() ->
info_all(Items) ->
rabbit_misc:filter_exit_map(fun (C) -> info(C, Items) end, list()).
+refresh_config_all() ->
+ rabbit_misc:upmap(
+ fun (C) -> gen_server2:call(C, refresh_config) end, list()),
+ ok.
+
emit_stats(Pid) ->
gen_server2:cast(Pid, emit_stats).
@@ -219,6 +225,9 @@ handle_call({info, Items}, _From, State) ->
catch Error -> reply({error, Error}, State)
end;
+handle_call(refresh_config, _From, State = #ch{virtual_host = VHost}) ->
+ reply(ok, State#ch{trace_state = rabbit_trace:init(VHost)});
+
handle_call(_Request, _From, State) ->
noreply(State).