diff options
author | Bernard Normier <bernard@zeroc.com> | 2017-01-11 16:15:49 -0500 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2017-01-11 16:15:49 -0500 |
commit | f6a5299766fe3db2273afd78f145486b091513ed (patch) | |
tree | 87eead6b9fa33e43f7b863093fd410167d9cb23a /cpp/src/IceGrid | |
parent | Fixed Glacier2/router IE browser test failure (diff) | |
download | ice-f6a5299766fe3db2273afd78f145486b091513ed.tar.bz2 ice-f6a5299766fe3db2273afd78f145486b091513ed.tar.xz ice-f6a5299766fe3db2273afd78f145486b091513ed.zip |
Moved UniquePtr to IceInternal
Removed ctor and assignment operator from UniquePtr
Diffstat (limited to 'cpp/src/IceGrid')
-rw-r--r-- | cpp/src/IceGrid/AdapterCache.cpp | 2 | ||||
-rw-r--r-- | cpp/src/IceGrid/Database.cpp | 12 | ||||
-rw-r--r-- | cpp/src/IceGrid/DescriptorParser.cpp | 16 | ||||
-rw-r--r-- | cpp/src/IceGrid/IceGridNode.cpp | 2 | ||||
-rw-r--r-- | cpp/src/IceGrid/LocatorI.cpp | 4 | ||||
-rw-r--r-- | cpp/src/IceGrid/NodeSessionManager.cpp | 2 | ||||
-rw-r--r-- | cpp/src/IceGrid/RegistryI.h | 3 | ||||
-rw-r--r-- | cpp/src/IceGrid/ReplicaSessionManager.cpp | 2 | ||||
-rw-r--r-- | cpp/src/IceGrid/ServerCache.cpp | 30 | ||||
-rw-r--r-- | cpp/src/IceGrid/ServerCache.h | 9 | ||||
-rw-r--r-- | cpp/src/IceGrid/ServerI.h | 2 |
11 files changed, 43 insertions, 41 deletions
diff --git a/cpp/src/IceGrid/AdapterCache.cpp b/cpp/src/IceGrid/AdapterCache.cpp index 21d15103452..e9fd5d85e2b 100644 --- a/cpp/src/IceGrid/AdapterCache.cpp +++ b/cpp/src/IceGrid/AdapterCache.cpp @@ -169,7 +169,7 @@ private: int _synchronizeCount; int _synchronizedCount; int _nReplicas; - IceUtil::UniquePtr<Ice::Exception> _exception; + IceInternal::UniquePtr<Ice::Exception> _exception; }; typedef IceUtil::Handle<ReplicaGroupSyncCallback> ReplicaGroupSyncCallbackPtr; diff --git a/cpp/src/IceGrid/Database.cpp b/cpp/src/IceGrid/Database.cpp index 5c9167b784d..ce458e52936 100644 --- a/cpp/src/IceGrid/Database.cpp +++ b/cpp/src/IceGrid/Database.cpp @@ -713,8 +713,8 @@ Database::updateApplication(const ApplicationUpdateInfo& updt, bool noRestart, A ApplicationInfo oldApp; ApplicationUpdateInfo update = updt; - IceUtil::UniquePtr<ApplicationHelper> previous; - IceUtil::UniquePtr<ApplicationHelper> helper; + IceInternal::UniquePtr<ApplicationHelper> previous; + IceInternal::UniquePtr<ApplicationHelper> helper; try { Lock sync(*this); @@ -755,8 +755,8 @@ Database::syncApplicationDescriptor(const ApplicationDescriptor& newDesc, bool n ApplicationUpdateInfo update; ApplicationInfo oldApp; - IceUtil::UniquePtr<ApplicationHelper> previous; - IceUtil::UniquePtr<ApplicationHelper> helper; + IceInternal::UniquePtr<ApplicationHelper> previous; + IceInternal::UniquePtr<ApplicationHelper> helper; try { Lock sync(*this); @@ -800,8 +800,8 @@ Database::instantiateServer(const string& application, ApplicationUpdateInfo update; ApplicationInfo oldApp; - IceUtil::UniquePtr<ApplicationHelper> previous; - IceUtil::UniquePtr<ApplicationHelper> helper; + IceInternal::UniquePtr<ApplicationHelper> previous; + IceInternal::UniquePtr<ApplicationHelper> helper; try { diff --git a/cpp/src/IceGrid/DescriptorParser.cpp b/cpp/src/IceGrid/DescriptorParser.cpp index 173cdb72011..8e8d96542d0 100644 --- a/cpp/src/IceGrid/DescriptorParser.cpp +++ b/cpp/src/IceGrid/DescriptorParser.cpp @@ -61,15 +61,15 @@ private: int _line; int _column; - IceUtil::UniquePtr<ApplicationDescriptorBuilder> _currentApplication; - IceUtil::UniquePtr<NodeDescriptorBuilder> _currentNode; - IceUtil::UniquePtr<TemplateDescriptorBuilder> _currentTemplate; - IceUtil::UniquePtr<ServerInstanceDescriptorBuilder> _currentServerInstance; - IceUtil::UniquePtr<ServiceInstanceDescriptorBuilder> _currentServiceInstance; - IceUtil::UniquePtr<ServerDescriptorBuilder> _currentServer; - IceUtil::UniquePtr<ServiceDescriptorBuilder> _currentService; + IceInternal::UniquePtr<ApplicationDescriptorBuilder> _currentApplication; + IceInternal::UniquePtr<NodeDescriptorBuilder> _currentNode; + IceInternal::UniquePtr<TemplateDescriptorBuilder> _currentTemplate; + IceInternal::UniquePtr<ServerInstanceDescriptorBuilder> _currentServerInstance; + IceInternal::UniquePtr<ServiceInstanceDescriptorBuilder> _currentServiceInstance; + IceInternal::UniquePtr<ServerDescriptorBuilder> _currentServer; + IceInternal::UniquePtr<ServiceDescriptorBuilder> _currentService; CommunicatorDescriptorBuilder* _currentCommunicator; - IceUtil::UniquePtr<PropertySetDescriptorBuilder> _currentPropertySet; + IceInternal::UniquePtr<PropertySetDescriptorBuilder> _currentPropertySet; bool _isTopLevel; bool _inAdapter; diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp index 0c14ca557b4..027a266a3a3 100644 --- a/cpp/src/IceGrid/IceGridNode.cpp +++ b/cpp/src/IceGrid/IceGridNode.cpp @@ -81,7 +81,7 @@ private: IceUtil::TimerPtr _timer; RegistryIPtr _registry; NodeIPtr _node; - IceUtil::UniquePtr<NodeSessionManager> _sessions; + IceInternal::UniquePtr<NodeSessionManager> _sessions; Ice::ObjectAdapterPtr _adapter; }; diff --git a/cpp/src/IceGrid/LocatorI.cpp b/cpp/src/IceGrid/LocatorI.cpp index 1ca7a9645d6..575ebe71fd4 100644 --- a/cpp/src/IceGrid/LocatorI.cpp +++ b/cpp/src/IceGrid/LocatorI.cpp @@ -454,7 +454,7 @@ private: unsigned int _count; LocatorAdapterInfoSeq::const_iterator _lastAdapter; std::map<std::string, Ice::ObjectPrx> _proxies; - IceUtil::UniquePtr<Ice::Exception> _exception; + IceInternal::UniquePtr<Ice::Exception> _exception; }; class RoundRobinRequest : public LocatorI::Request, SynchronizationCallback, public IceUtil::Mutex @@ -752,7 +752,7 @@ private: bool _waitForActivation; set<string> _failed; set<string> _activatingOrFailed; - IceUtil::UniquePtr<Ice::Exception> _exception; + IceInternal::UniquePtr<Ice::Exception> _exception; }; class FindAdapterByIdCallback : public SynchronizationCallback diff --git a/cpp/src/IceGrid/NodeSessionManager.cpp b/cpp/src/IceGrid/NodeSessionManager.cpp index dcf06b34a05..c29103ac0ce 100644 --- a/cpp/src/IceGrid/NodeSessionManager.cpp +++ b/cpp/src/IceGrid/NodeSessionManager.cpp @@ -35,7 +35,7 @@ NodeSessionPrx NodeSessionKeepAliveThread::createSession(InternalRegistryPrx& registry, IceUtil::Time& timeout) { NodeSessionPrx session; - IceUtil::UniquePtr<Ice::Exception> exception; + IceInternal::UniquePtr<Ice::Exception> exception; TraceLevelsPtr traceLevels = _node->getTraceLevels(); try { diff --git a/cpp/src/IceGrid/RegistryI.h b/cpp/src/IceGrid/RegistryI.h index 25b8891ea26..8fa74eb3938 100644 --- a/cpp/src/IceGrid/RegistryI.h +++ b/cpp/src/IceGrid/RegistryI.h @@ -11,6 +11,7 @@ #define ICE_GRID_REGISTRYI_H #include <IceUtil/Timer.h> +#include <Ice/UniquePtr.h> #include <IceGrid/Registry.h> #include <IceGrid/Internal.h> #include <IceGrid/PlatformInfo.h> @@ -119,7 +120,7 @@ private: IceUtil::TimerPtr _timer; SessionServantManagerPtr _servantManager; int _sessionTimeout; - IceUtil::UniquePtr<ReplicaSessionManager> _session; + IceInternal::UniquePtr<ReplicaSessionManager> _session; mutable PlatformInfo _platform; ClientSessionFactoryPtr _clientSessionFactory; diff --git a/cpp/src/IceGrid/ReplicaSessionManager.cpp b/cpp/src/IceGrid/ReplicaSessionManager.cpp index 9895963a1c5..dfc55e299bd 100644 --- a/cpp/src/IceGrid/ReplicaSessionManager.cpp +++ b/cpp/src/IceGrid/ReplicaSessionManager.cpp @@ -465,7 +465,7 @@ ReplicaSessionPrx ReplicaSessionManager::createSession(InternalRegistryPrx& registry, IceUtil::Time& timeout) { ReplicaSessionPrx session; - IceUtil::UniquePtr<Ice::Exception> exception; + IceInternal::UniquePtr<Ice::Exception> exception; try { if(_traceLevels && _traceLevels->replica > 1) diff --git a/cpp/src/IceGrid/ServerCache.cpp b/cpp/src/IceGrid/ServerCache.cpp index af4bd9654ea..20a9d967ff3 100644 --- a/cpp/src/IceGrid/ServerCache.cpp +++ b/cpp/src/IceGrid/ServerCache.cpp @@ -393,7 +393,7 @@ ServerEntry::unsync() Lock sync(*this); if(_loaded.get()) { - _load = _loaded; + _load.reset(_loaded.release()); } _proxy = 0; _adapters.clear(); @@ -421,7 +421,7 @@ ServerEntry::update(const ServerInfo& info, bool noRestart) { Lock sync(*this); - IceUtil::UniquePtr<ServerInfo> descriptor(new ServerInfo()); + IceInternal::UniquePtr<ServerInfo> descriptor(new ServerInfo()); *descriptor = info; _updated = true; @@ -430,17 +430,17 @@ ServerEntry::update(const ServerInfo& info, bool noRestart) { if(_loaded.get() && descriptor->node != _loaded->node) { - _destroy = _loaded; + _destroy.reset(_loaded.release()); } else if(_load.get() && descriptor->node != _load->node) { - _destroy = _load; + _destroy.reset(_load.release()); } } - _load = descriptor; + _load.reset(descriptor.release()); _noRestart = noRestart; - _loaded.reset(0); + _loaded.reset(); _allocatable = info.descriptor->allocatable; if(info.descriptor->activation == "session") { @@ -462,18 +462,18 @@ ServerEntry::destroy(bool noRestart) if(_loaded.get()) { assert(!_destroy.get()); - _destroy = _loaded; + _destroy.reset(_loaded.release()); } else if(_load.get()) { assert(!_destroy.get()); - _destroy = _load; + _destroy.reset(_load.release()); } } _noRestart = noRestart; - _load.reset(0); - _loaded.reset(0); + _load.reset(); + _loaded.reset(); _allocatable = false; } @@ -685,7 +685,7 @@ ServerEntry::syncImpl() if(!_load.get() && !_destroy.get()) { - _load = _loaded; // Re-load the current server. + _load.reset(_loaded.release()); // Re-load the current server. } _updated = false; @@ -853,8 +853,8 @@ ServerEntry::loadCallback(const ServerPrx& proxy, const AdapterPrxDict& adpts, i // time should set the correct timeout before invoking on the // proxy (e.g.: server start/stop, adapter activate). // - _loaded = _load; - assert(_loaded.get()); + assert(_load.get()); + _loaded.reset(_load.release()); _proxy = proxy; _adapters = adpts; _activationTimeout = at; @@ -1126,7 +1126,7 @@ ServerEntry::allocated(const SessionIPtr& session) _updated = true; if(!_load.get()) { - _load = _loaded; + _load.reset(_loaded.release()); } _session = session; _load->sessionId = session->getId(); @@ -1213,7 +1213,7 @@ ServerEntry::released(const SessionIPtr& session) _updated = true; if(!_load.get()) { - _load = _loaded; + _load.reset(_loaded.release()); } _load->sessionId = ""; _session = 0; diff --git a/cpp/src/IceGrid/ServerCache.h b/cpp/src/IceGrid/ServerCache.h index 224d2c0e341..d604439caa8 100644 --- a/cpp/src/IceGrid/ServerCache.h +++ b/cpp/src/IceGrid/ServerCache.h @@ -12,6 +12,7 @@ #include <IceUtil/Mutex.h> #include <IceUtil/Shared.h> +#include <Ice/UniquePtr.h> #include <IceGrid/Descriptor.h> #include <IceGrid/Internal.h> #include <IceGrid/Registry.h> @@ -110,9 +111,9 @@ private: ServerCache& _cache; const std::string _id; - IceUtil::UniquePtr<ServerInfo> _loaded; - IceUtil::UniquePtr<ServerInfo> _load; - IceUtil::UniquePtr<ServerInfo> _destroy; + IceInternal::UniquePtr<ServerInfo> _loaded; + IceInternal::UniquePtr<ServerInfo> _load; + IceInternal::UniquePtr<ServerInfo> _destroy; ServerPrx _proxy; AdapterPrxDict _adapters; @@ -121,7 +122,7 @@ private: bool _synchronizing; bool _updated; - IceUtil::UniquePtr<Ice::Exception> _exception; + IceInternal::UniquePtr<Ice::Exception> _exception; bool _noRestart; std::vector<SynchronizationCallbackPtr> _callbacks; diff --git a/cpp/src/IceGrid/ServerI.h b/cpp/src/IceGrid/ServerI.h index 0512664ce7c..d2fc8ccc28b 100644 --- a/cpp/src/IceGrid/ServerI.h +++ b/cpp/src/IceGrid/ServerI.h @@ -327,7 +327,7 @@ private: std::vector<AMD_Node_loadServerPtr> _loadCB; bool _clearDir; InternalServerDescriptorPtr _desc; - IceUtil::UniquePtr<DeploymentException> _exception; + IceInternal::UniquePtr<DeploymentException> _exception; InternalServerDescriptorPtr _runtime; bool _updating; TraceLevelsPtr _traceLevels; |