[
https://issues.apache.org/jira/browse/GEODE-3136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16242448#comment-16242448
]
ASF GitHub Bot commented on GEODE-3136:
---------------------------------------
pivotal-jbarrett commented on a change in pull request #144: GEODE-3136:
Convert time values to std::chrono::duration.
URL: https://github.com/apache/geode-native/pull/144#discussion_r149442961
##########
File path: cppcache/src/TcrConnection.cpp
##########
@@ -592,56 +593,26 @@ Connector* TcrConnection::createConnection(const char*
endpoint,
* that is used instead
* Body: default timeout
*/
-inline ConnErrType TcrConnection::receiveData(char* buffer, int32_t length,
- uint32_t receiveTimeoutSec,
- bool checkConnected,
- bool isNotificationMessage,
- int32_t notPublicApiWithTimeout)
{
+inline ConnErrType TcrConnection::receiveData(
+ char* buffer, int32_t length, std::chrono::microseconds receiveTimeoutSec,
+ bool checkConnected, bool isNotificationMessage) {
GF_DEV_ASSERT(buffer != nullptr);
GF_DEV_ASSERT(m_conn != nullptr);
- // if gfcpp property unit set then sendTimeoutSec will be in millisecond
- // otherwise it will be in second
- if (m_poolDM->getConnectionManager()
- .getCacheImpl()
- ->getDistributedSystem()
- .getSystemProperties()
- .readTimeoutUnitInMillis()) {
- LOGFINER("recieveData %d %d ", receiveTimeoutSec, notPublicApiWithTimeout);
- if (notPublicApiWithTimeout == TcrMessage::QUERY ||
Review comment:
Correct. All this code was figuring out if that “treat time as milliseconds”
flag as set and if message was of any of these types then treat a milliseconds
otherwise seconds. All goes away with strongly typed time units.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Replace all public API time values with std::chrono types
> ---------------------------------------------------------
>
> Key: GEODE-3136
> URL: https://issues.apache.org/jira/browse/GEODE-3136
> Project: Geode
> Issue Type: Improvement
> Components: native client
> Reporter: Jacob S. Barrett
> Assignee: Jacob S. Barrett
>
> Remove ambiguity of time values by using
> [{{std::chrono}}|http://en.cppreference.com/w/cpp/chrono] types in the public
> API.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)