time_t m_time_last_use;
mp::Package * m_close_package;
~BackendInstance();
+ void timestamp();
};
// backends of some class (all with same InitKey)
class SessionShared::BackendClass : boost::noncopyable {
void yf::SessionShared::BackendClass::use_backend(BackendInstancePtr backend)
{
backend->m_in_use = true;
- time(&backend->m_time_last_use);
backend->m_sequence_this = m_sequence_top++;
}
+void yf::SessionShared::BackendInstance::timestamp()
+{
+ assert(m_in_use);
+ time(&m_time_last_use);
+}
+
yf::SessionShared::BackendInstance::~BackendInstance()
{
delete m_close_package;
else
result_set_id = "default";
}
+ found_backend->timestamp();
+
// we must search ...
BackendSetPtr new_set(new BackendSet(result_set_id,
databases, query));
bc->release_backend(found_backend);
return;
}
+
+ found_backend->timestamp();
Z_APDU *p_apdu = zget_APDU(odr, Z_APDU_presentRequest);
Z_PresentRequest *p_req = p_apdu->u.presentRequest;
else
{
Package scan_package(backend->m_session, frontend_package.origin());
+ backend->timestamp();
scan_package.copy_filter(frontend_package);
scan_package.request() = apdu_req;
scan_package.move();
{
boost::xtime xt;
boost::xtime_get(&xt, boost::TIME_UTC);
- xt.sec += 30;
+ xt.sec += m_session_ttl / 3;
boost::thread::sleep(xt);
BackendClassMap::const_iterator b_it = m_backend_map.begin();