summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rabbit_exchange.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rabbit_exchange.erl b/src/rabbit_exchange.erl
index aaea27f91a..7697621c1a 100644
--- a/src/rabbit_exchange.erl
+++ b/src/rabbit_exchange.erl
@@ -23,7 +23,7 @@
lookup/1, lookup_or_die/1, list/0, list/1, lookup_scratch/2,
update_scratch/3, update_decorators/1, immutable/1,
info_keys/0, info/1, info/2, info_all/1, info_all/2, info_all/4,
- route/2, delete/2, validate_binding/2]).
+ route/2, delete/2, validate_binding/2, list_names/0]).
%% these must be run inside a mnesia tx
-export([maybe_auto_delete/2, serial/1, peek_serial/1, update/2]).
@@ -61,6 +61,7 @@
(name()) -> rabbit_types:exchange() |
rabbit_types:channel_exit().
-spec list() -> [rabbit_types:exchange()].
+-spec list_names() -> [rabbit_exchange:name()].
-spec list(rabbit_types:vhost()) -> [rabbit_types:exchange()].
-spec lookup_scratch(name(), atom()) ->
rabbit_types:ok(term()) |
@@ -258,6 +259,8 @@ lookup_or_die(Name) ->
list() -> mnesia:dirty_match_object(rabbit_exchange, #exchange{_ = '_'}).
+list_names() -> mnesia:dirty_all_keys(rabbit_exchange).
+
%% Not dirty_match_object since that would not be transactional when used in a
%% tx context
list(VHostPath) ->