简体   繁体   English

在OCCI中获取连接超时

[英]Getting Connection timeout in OCCI

I need to test the connectivity if the Oracle::OCCI::Connection, and how can i get and set the connection timeout value? 我需要测试Oracle :: OCCI :: Connection的连接性,以及如何获取和设置连接超时值? i read the documentation of Oracle OCCI but i can't find the required functions. 我阅读了Oracle OCCI的文档但我找不到所需的功能。

Thanks in Advance. 提前致谢。

This answer refers to setTimeout() function of oracle::occi::ConnectionPool class, not the Oracle::OCCI::Connection . 这个答案是指oracle::occi::ConnectionPool类的setTimeout()函数,而不是Oracle::OCCI::Connection This function sets a timeout for disconnecting an idle pool connections, not a connect timeout. 此函数设置断开空闲池连接的超时,而不是连接超时。

But I don't know the real answer... 但我不知道真正的答案......

Check this document: http://www.terralib.org/html/v410/classoracle_1_1occi_1_1_connection_pool.html 查看此文档: http//www.terralib.org/html/v410/classoracle_1_1occi_1_1_connection_pool.html

Here you can see 在这里你可以看到

  • virtual unsigned int getTimeOut () const =0 virtual unsigned int getTimeOut()const = 0
  • and
  • virtual void setTimeOut (unsigned int connTimeOut=0)=0 virtual void setTimeOut(unsigned int connTimeOut = 0)= 0

functions. 职能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM