summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/LocatorRegistryI.h
blob: c9137ccf1e236850736024789a6067b4696a51b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//

#ifndef ICE_GRID_LOCATOR_REGISTRY_I_H
#define ICE_GRID_LOCATOR_REGISTRY_I_H

#include <Ice/Locator.h>
#include <IceGrid/Internal.h>

namespace IceGrid
{

class Database;
class ReplicaSessionManager;
class TraceLevels;

class LocatorRegistryI final : public Ice::LocatorRegistry, public std::enable_shared_from_this<LocatorRegistryI>
{
public:

    LocatorRegistryI(const std::shared_ptr<Database>&, bool, bool, ReplicaSessionManager&);

    void setAdapterDirectProxyAsync(std::string, std::shared_ptr<Ice::ObjectPrx>,
                                    std::function<void()>,
                                    std::function<void(std::exception_ptr)>,
                                    const Ice::Current&) override;

    void setReplicatedAdapterDirectProxyAsync(std::string, std::string, std::shared_ptr<Ice::ObjectPrx>,
                                              std::function<void()>,
                                              std::function<void(std::exception_ptr)>,
                                              const Ice::Current&) override;

    void setServerProcessProxyAsync(std::string, std::shared_ptr<Ice::ProcessPrx>,
                                    std::function<void()>,
                                    std::function<void(std::exception_ptr)>,
                                    const Ice::Current&) override;

    void setAdapterDirectProxy(std::string, std::string, std::shared_ptr<Ice::ObjectPrx>,
                               std::function<void()>,
                               std::function<void(std::exception_ptr)>);

    const std::shared_ptr<TraceLevels>& getTraceLevels() const;

private:

    const std::shared_ptr<Database> _database;
    const bool _dynamicRegistration;
    const bool _master;
    ReplicaSessionManager& _session;
};

}

#endif