27 #ifndef Hypertable_RangeServer_ScannerMap_h
28 #define Hypertable_RangeServer_ScannerMap_h
37 #include <unordered_map>
85 bool remove(int32_t id);
150 #endif // Hypertable_RangeServer_ScannerMap_h
void purge_expired(int32_t max_idle_ms)
This method iterates through the scanner map purging mappings that have not been referenced for max_i...
int64_t last_access_millis
Last access time in milliseconds since epoch.
ProfileDataScanner profile_data
Accumulated profile data.
Wrapper for TableIdentifier providing member storage.
Declarations for ProfileDataScanner.
MergeScannerRangePtr scanner
Scanner.
std::shared_ptr< MergeScannerRange > MergeScannerRangePtr
Smart pointer to MergeScannerRange.
int32_t put(MergeScannerRangePtr &scanner, RangePtr &range, const TableIdentifier &table, ProfileDataScanner &profile_data)
This method computes a unique scanner ID and puts the given scanner and range pointers into a map usi...
Holds scanner information.
static std::atomic< int > ms_next_id
Next available scanner ID.
Map to hold outstanding scanners.
std::shared_ptr< Range > RangePtr
Smart pointer to Range.
std::mutex m_mutex
Mutex for serializing access to members
void get_counts(int32_t *totalp, CstrToInt32Map &table_scanner_count_map)
This method retrieves outstanding scanner counts.
TableIdentifierManaged table
Table identifier.
Declarations for MergeScannerRange.
std::unordered_map< int32_t, ScanInfo > m_scanner_map
Scanner map.
void update_profile_data(int32_t id, ProfileDataScanner &profile_data)
Updates profile data of a scanner in the map.
int64_t get_timestamp_millis()
Returns the number of milliseconds since the epoch.
std::map< const char *, int32_t, LtCstr > CstrToInt32Map
STL map from c-style string to int32_t.