[asterisk-scf-commits] asterisk-scf/integration/ice-util-cpp.git branch "operation-context-propagation" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Fri Feb 3 09:02:45 CST 2012
branch "operation-context-propagation" has been updated
via 596b2bc7cd7435647a2d6197223cb189b21290b3 (commit)
via 36a0e0be779c4fbef32fa063ebb88dbbe66710d3 (commit)
via 6fc167a116b660eb2cd6cc798976030874fcc29e (commit)
via a2f6d2e757244acc9ca6c0583bc68fb4d52d14f6 (commit)
via f8321e105ea059622ad3f1ba1690e9f7f581a8f8 (commit)
via 4cf6a1608548d00b6cdd06b683648b38aa44c64d (commit)
via bc87a3370215789d0db7783e4a4d0c847fd68c56 (commit)
via 1cc46335e9e0efd2a0baea66c2e002267c12da56 (commit)
via 744a068b60119bdec7fa9d26cadd856db1cd0fc1 (commit)
via 7c49b6b4767c55addec761e35de7693615ea9475 (commit)
from 80b1d74233710b0d2987cc11d54d1fe9a39b5267 (commit)
Summary of changes:
.../Discovery/LocatorRegistrationWrapper.h | 119 +++++++++-
include/AsteriskSCF/Helpers/OperationContext.h | 2 +-
.../AsteriskSCF/Helpers/OperationContextCache.h | 102 ++++++++
include/AsteriskSCF/Helpers/Retry.h | 21 ++-
src/Helpers/CMakeLists.txt | 1 +
src/Helpers/OperationContextCache.cpp | 241 ++++++++++++++++++++
test/CMakeLists.txt | 3 +
.../LocatorRegistrationTest.cpp | 25 +-
.../OperationContextCacheTest.cpp | 95 ++++++++
.../OperationContextCacheTest.h} | 13 +-
test/UtilityTests.cpp | 4 +-
11 files changed, 593 insertions(+), 33 deletions(-)
create mode 100644 include/AsteriskSCF/Helpers/OperationContextCache.h
create mode 100644 src/Helpers/OperationContextCache.cpp
create mode 100644 test/OperationContextCache/OperationContextCacheTest.cpp
copy test/{PropertyHelper/PropertyHelperTest.h => OperationContextCache/OperationContextCacheTest.h} (67%)
- Log -----------------------------------------------------------------
commit 596b2bc7cd7435647a2d6197223cb189b21290b3
Merge: 36a0e0b 6fc167a
Author: Brent Eagles <beagles at digium.com>
Date: Fri Feb 3 11:31:59 2012 -0330
Merge 'integration/retry_deux' into operation-context-propagation
Conflicts resolved in:
include/AsteriskSCF/Discovery/LocatorRegistrationWrapper.h
test/LocatorRegistration/LocatorRegistrationTest.cpp
diff --cc include/AsteriskSCF/Discovery/LocatorRegistrationWrapper.h
index 141b026,752325b..b66f562
--- a/include/AsteriskSCF/Discovery/LocatorRegistrationWrapper.h
+++ b/include/AsteriskSCF/Discovery/LocatorRegistrationWrapper.h
@@@ -17,10 -17,12 +17,13 @@@
#include <Ice/Ice.h>
#include <IceUtil/Thread.h>
- #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
+ #include <IceUtil/UUID.h>
#include <string>
+#include <AsteriskSCF/Helpers/OperationContext.h>
+ #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
+ #include <AsteriskSCF/Helpers/Retry.h>
+
namespace AsteriskSCF
{
namespace Discovery
diff --cc test/LocatorRegistration/LocatorRegistrationTest.cpp
index bf0b625,d100fab..925324a
--- a/test/LocatorRegistration/LocatorRegistrationTest.cpp
+++ b/test/LocatorRegistration/LocatorRegistrationTest.cpp
@@@ -485,7 -475,7 +477,11 @@@ public
mMgrToken = mManager->addService(mManager, mMgrTokenUUID);
AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr params(new AsteriskSCF::Core::Discovery::V1::ServiceLocatorParams);
params->category = "AsteriskSCF.LocatorManager";
++<<<<<<< HEAD
+ mMgrToken->addLocatorParams(AsteriskSCF::createContext(), params, "");
++=======
+ mMgrToken->addLocatorParams(new OperationContext(IceUtil::generateUUID()), params, "");
++>>>>>>> dev/retry_deux
}
}
commit 36a0e0be779c4fbef32fa063ebb88dbbe66710d3
Author: Brent Eagles <beagles at digium.com>
Date: Fri Feb 3 11:23:27 2012 -0330
Operation contexts in all the right places.
diff --git a/include/AsteriskSCF/Discovery/LocatorRegistrationWrapper.h b/include/AsteriskSCF/Discovery/LocatorRegistrationWrapper.h
index e6d410f..141b026 100644
--- a/include/AsteriskSCF/Discovery/LocatorRegistrationWrapper.h
+++ b/include/AsteriskSCF/Discovery/LocatorRegistrationWrapper.h
@@ -19,6 +19,7 @@
#include <IceUtil/Thread.h>
#include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
#include <string>
+#include <AsteriskSCF/Helpers/OperationContext.h>
namespace AsteriskSCF
{
@@ -73,7 +74,7 @@ public:
management->addService(mService, mName));
if (mServiceManagement)
{
- mServiceManagement->addLocatorParams(mParameters, mComparatorGUID);
+ mServiceManagement->addLocatorParams(AsteriskSCF::createContext(), mParameters, mComparatorGUID);
return true;
}
}
diff --git a/include/AsteriskSCF/Helpers/OperationContext.h b/include/AsteriskSCF/Helpers/OperationContext.h
index aa81353..6758d9a 100644
--- a/include/AsteriskSCF/Helpers/OperationContext.h
+++ b/include/AsteriskSCF/Helpers/OperationContext.h
@@ -24,7 +24,7 @@ namespace AsteriskSCF
/**
* createContext simply creates a new OperationContext instance with the ID set to a UUID.
*/
-AsteriskSCF::System::V1::OperationContextPtr createContext()
+inline AsteriskSCF::System::V1::OperationContextPtr createContext()
{
AsteriskSCF::System::V1::OperationContextPtr newContext(new AsteriskSCF::System::V1::OperationContext);
newContext->id = IceUtil::generateUUID();
diff --git a/test/LocatorRegistration/LocatorRegistrationTest.cpp b/test/LocatorRegistration/LocatorRegistrationTest.cpp
index 7f84c58..bf0b625 100644
--- a/test/LocatorRegistration/LocatorRegistrationTest.cpp
+++ b/test/LocatorRegistration/LocatorRegistrationTest.cpp
@@ -31,6 +31,7 @@
#include <map>
#include <AsteriskSCF/Helpers/PropertyHelper.h>
#include <AsteriskSCF/Helpers/ProxyHelper.h>
+#include <AsteriskSCF/Helpers/OperationContext.h>
#include <boost/thread/locks.hpp>
#include <boost/thread/shared_mutex.hpp>
@@ -139,9 +140,11 @@ public:
{
}
- void addLocatorParams(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr& params,
- const std::string& compareGUID,
- const Ice::Current&)
+ void addLocatorParams(
+ const AsteriskSCF::System::V1::OperationContextPtr&,
+ const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr& params,
+ const std::string& compareGUID,
+ const Ice::Current&)
{
statePreCheck();
mData->add(compareGUID, params);
@@ -482,7 +485,7 @@ public:
mMgrToken = mManager->addService(mManager, mMgrTokenUUID);
AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr params(new AsteriskSCF::Core::Discovery::V1::ServiceLocatorParams);
params->category = "AsteriskSCF.LocatorManager";
- mMgrToken->addLocatorParams(params, "");
+ mMgrToken->addLocatorParams(AsteriskSCF::createContext(), params, "");
}
}
-----------------------------------------------------------------------
--
asterisk-scf/integration/ice-util-cpp.git
More information about the asterisk-scf-commits
mailing list