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

Method setupIdleTimer

src/jrd/Attachment.cpp:1106–1127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1104}
1105
1106void Attachment::setupIdleTimer(bool clear)
1107{
1108 unsigned int timeout = clear ? 0 : getActualIdleTimeout();
1109 if (!timeout || hasActiveRequests())
1110 {
1111 if (att_idle_timer)
1112 att_idle_timer->reset(0);
1113 }
1114 else
1115 {
1116 if (!att_idle_timer)
1117 {
1118 using IdleTimer = TimerWithRef<StableAttachmentPart>;
1119
1120 auto idleTimer = FB_NEW IdleTimer(getStable());
1121 idleTimer->setOnTimer(&StableAttachmentPart::onIdleTimer);
1122 att_idle_timer = idleTimer;
1123 }
1124
1125 att_idle_timer->reset(timeout);
1126 }
1127}
1128
1129UserId* Attachment::getUserId(const MetaString& userName)
1130{

Callers 4

getAttachmentMethod · 0.45
releaseAttachmentMethod · 0.45
AttachmentHolderMethod · 0.45
~AttachmentHolderMethod · 0.45

Calls 3

IdleTimerClass · 0.85
resetMethod · 0.45
setOnTimerMethod · 0.45

Tested by

no test coverage detected