Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection> objects compare equal. Objects that compare equal share the same underlying resources.
Performance
Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.
Thread Safety
Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["\u003cp\u003eThis webpage provides documentation for the \u003ccode\u003eSqlInstanceNamesServiceClient\u003c/code\u003e class within the Google Cloud SQL C++ client library, detailing its functionality and various versions.\u003c/p\u003e\n"],["\u003cp\u003eThe latest release candidate (rc) version available is \u003ccode\u003e2.37.0-rc\u003c/code\u003e, with a comprehensive list of stable releases ranging from \u003ccode\u003e2.36.0\u003c/code\u003e down to \u003ccode\u003e2.11.0\u003c/code\u003e, and \u003ccode\u003e2.24.0\u003c/code\u003e is also a part of these listed releases.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSqlInstanceNamesServiceClient\u003c/code\u003e class ensures that instances created via copy operations compare equally, and share the same underlying resources, while new objects establish fresh connections to the service.\u003c/p\u003e\n"],["\u003cp\u003eCopy and move support is available for both \u003ccode\u003eSqlInstanceNamesServiceClient\u003c/code\u003e constructors and operators, including \u003ccode\u003eSqlInstanceNamesServiceClient(SqlInstanceNamesServiceClient const &)\u003c/code\u003e and \u003ccode\u003eoperator=(SqlInstanceNamesServiceClient const &)\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eConcurrent access is safe for different instances of the \u003ccode\u003eSqlInstanceNamesServiceClient\u003c/code\u003e, even if they compare as equal, but is not guaranteed to work for two or more threads operating on the same instance.\u003c/p\u003e\n"]]],[],null,[]]