MCPcopy Create free account
hub / github.com/apache/trafficserver / unmanage_api_object

Method unmanage_api_object

src/proxy/logging/LogObject.cc:1178–1202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1176}
1177
1178bool
1179LogObjectManager::unmanage_api_object(LogObject *logObject)
1180{
1181 if (!logObject) {
1182 return false;
1183 }
1184
1185 ACQUIRE_API_MUTEX("A LogObjectManager::unmanage_api_object");
1186
1187 auto index = std::find(this->_APIobjects.begin(), this->_APIobjects.end(), logObject);
1188
1189 if (index != this->_APIobjects.end()) {
1190 this->_APIobjects.erase(index);
1191
1192 // Force a buffer flush, then schedule this LogObject to be deleted on the eventProcessor.
1193 logObject->force_new_buffer();
1194 new_Derefer(logObject, HRTIME_SECONDS(60));
1195
1196 RELEASE_API_MUTEX("R LogObjectManager::unmanage_api_object");
1197 return true;
1198 }
1199
1200 RELEASE_API_MUTEX("R LogObjectManager::unmanage_api_object");
1201 return false;
1202}
1203
1204void
1205LogObjectManager::add_filter_to_all(LogFilter *filter)

Callers 1

TSTextLogObjectDestroyFunction · 0.80

Calls 5

new_DereferFunction · 0.85
force_new_bufferMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected