Public Member Functions | |
void | addIndex (SmartPtr< Index > index, const TimeInterval &maximumTimeBetweenRecords) |
The IndexMonitor takes over this Index at this point. | |
SmartPtr< Index > | getIndexByName (const std::string &name) |
Don't keep this index beyond this call; on the next timer, we may reconnect and the index will then be invalid. | |
SmartPtr< Index > | getIndexByURL (const URL &url) |
Don't keep this index beyond this call; on the next timer, we may reconnect and the index will then be invalid. | |
void | checkIndexes () |
This method is called through a timer. | |
Static Public Member Functions | |
static IndexMonitor & | instance (time_t checkingInterval=60) |
By default, we'll check every 60 seconds. | |
Classes | |
struct | IndexInfo |
void code::IndexMonitor::addIndex | ( | SmartPtr< Index > | index, | |
const TimeInterval & | maximumTimeBetweenRecords | |||
) |
The IndexMonitor takes over this Index at this point.
Do not retain the SmartPtr<Index> any more, because if the IndexMonitor reconnects, your pointer will no longer be valid. Get the index by name or url if needed. Note: we don't check to see if we already have the index.
void code::IndexMonitor::checkIndexes | ( | ) |
This method is called through a timer.
There is no need for clients to call it explicitly.
Don't keep this index beyond this call; on the next timer, we may reconnect and the index will then be invalid.
Don't keep this index beyond this call; on the next timer, we may reconnect and the index will then be invalid.
static IndexMonitor& code::IndexMonitor::instance | ( | time_t | checkingInterval = 60 |
) | [static] |
By default, we'll check every 60 seconds.
The first call to this method gets the checkingInterval. subsequent callers can not change it.