// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICE_GRID_INTERNALREGISTRYI_H #define ICE_GRID_INTERNALREGISTRYI_H #include #include namespace IceGrid { class Database; typedef IceUtil::Handle DatabasePtr; class FileCache; typedef IceUtil::Handle FileCachePtr; class WellKnownObjectsManager; typedef IceUtil::Handle WellKnownObjectsManagerPtr; class ReapThread; typedef IceUtil::Handle ReapThreadPtr; class RegistryI; typedef IceUtil::Handle RegistryIPtr; class ReplicaSessionManager; class InternalRegistryI : public InternalRegistry { public: InternalRegistryI(const RegistryIPtr&, const DatabasePtr&, const ReapThreadPtr&, const WellKnownObjectsManagerPtr&, ReplicaSessionManager&); virtual ~InternalRegistryI(); virtual NodeSessionPrx registerNode(const InternalNodeInfoPtr&, const NodePrx&, const LoadInfo&, const Ice::Current&); virtual ReplicaSessionPrx registerReplica(const InternalReplicaInfoPtr&, const InternalRegistryPrx&, const Ice::Current&); virtual void registerWithReplica(const InternalRegistryPrx&, const Ice::Current&); virtual NodePrxSeq getNodes(const Ice::Current&) const; virtual InternalRegistryPrxSeq getReplicas(const Ice::Current&) const; virtual void shutdown(const Ice::Current&) const; virtual Ice::Long getOffsetFromEnd(const std::string&, int, const Ice::Current&) const; virtual bool read(const std::string&, Ice::Long, int, Ice::Long&, Ice::StringSeq&, const Ice::Current&) const; private: std::string getFilePath(const std::string&) const; const RegistryIPtr _registry; const DatabasePtr _database; const ReapThreadPtr _reaper; const WellKnownObjectsManagerPtr _wellKnownObjects; const FileCachePtr _fileCache; ReplicaSessionManager& _session; int _nodeSessionTimeout; int _replicaSessionTimeout; }; }; #endif