MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / setLifeTime

Method setLifeTime

src/jrd/extds/ExtDS.cpp:1146–1167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1144}
1145
1146void ConnectionsPool::setLifeTime(ULONG val)
1147{
1148 if (val < MIN_LIFE_TIME || val > MAX_LIFE_TIME)
1149 {
1150 string err;
1151 err.printf("Wrong value for pooled connection lifetime (%d). Allowed values are between %d and %d.",
1152 val, MIN_LIFE_TIME, MAX_LIFE_TIME);
1153
1154 ERR_post(Arg::Gds(isc_random) << Arg::Str(err));
1155 }
1156
1157 bool startIdleTimer = false;
1158 {
1159 MutexLockGuard guard(m_mutex, FB_FUNCTION);
1160
1161 startIdleTimer = (m_lifeTime > val) && (m_timer != NULL) && (m_idleList != NULL);
1162 m_lifeTime = val;
1163 }
1164
1165 if (startIdleTimer)
1166 m_timer->start();
1167}
1168
1169void ConnectionsPool::clearIdle(thread_db* tdbb, bool all)
1170{

Callers

nothing calls this directly

Calls 5

GdsClass · 0.85
StrClass · 0.85
ERR_postFunction · 0.50
printfMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected