~ubuntu-branches/ubuntu/saucy/rabbitmq-server/saucy-proposed

« back to all changes in this revision

Viewing changes to plugins-src/rabbitmq-old-federation/src/rabbit_federation_old_sup.erl

  • Committer: Package Import Robot
  • Author(s): Emile Joubert
  • Date: 2013-05-02 11:19:31 UTC
  • mfrom: (0.5.2) (0.1.37 sid)
  • Revision ID: package-import@ubuntu.com-20130502111931-xnoj0sejto2tewcj
Tags: 3.1.0-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
%% The contents of this file are subject to the Mozilla Public License
2
 
%% Version 1.1 (the "License"); you may not use this file except in
3
 
%% compliance with the License. You may obtain a copy of the License
4
 
%% at http://www.mozilla.org/MPL/
5
 
%%
6
 
%% Software distributed under the License is distributed on an "AS IS"
7
 
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
8
 
%% the License for the specific language governing rights and
9
 
%% limitations under the License.
10
 
%%
11
 
%% The Original Code is RabbitMQ Federation.
12
 
%%
13
 
%% The Initial Developer of the Original Code is VMware, Inc.
14
 
%% Copyright (c) 2007-2013 VMware, Inc.  All rights reserved.
15
 
%%
16
 
 
17
 
-module(rabbit_federation_old_sup).
18
 
 
19
 
-behaviour(supervisor).
20
 
 
21
 
%% Supervises everything. There is just one of these.
22
 
 
23
 
-include_lib("rabbit_common/include/rabbit.hrl").
24
 
-define(SUPERVISOR, rabbit_federation_old_sup).
25
 
 
26
 
-export([start_link/0]).
27
 
 
28
 
-export([init/1]).
29
 
 
30
 
%% This supervisor needs to be part of the rabbit application since
31
 
%% a) it needs to be in place when exchange recovery takes place
32
 
%% b) it needs to go up and down with rabbit
33
 
 
34
 
-rabbit_boot_step({rabbit_federation_old_supervisor,
35
 
                   [{description, "federation_old"},
36
 
                    {mfa,         {rabbit_sup, start_child, [?MODULE]}},
37
 
                    {requires,    kernel_ready},
38
 
                    {enables,     rabbit_federation_old_exchange}]}).
39
 
 
40
 
%%----------------------------------------------------------------------------
41
 
 
42
 
start_link() ->
43
 
    supervisor:start_link({local, ?SUPERVISOR}, ?MODULE, []).
44
 
 
45
 
%%----------------------------------------------------------------------------
46
 
 
47
 
init([]) ->
48
 
    Status = {status, {rabbit_federation_old_status, start_link, []},
49
 
              transient, ?MAX_WAIT, worker,
50
 
              [rabbit_federation_old_status]},
51
 
    LinkSupSup = {links, {rabbit_federation_old_link_sup_sup, start_link, []},
52
 
                  transient, ?MAX_WAIT, supervisor,
53
 
                  [rabbit_federation_old_link_sup_sup]},
54
 
    {ok, {{one_for_one, 3, 10}, [Status, LinkSupSup]}}.