MaxHistorySize Class Reference

#include <RobotAPI/libraries/armem/server/wm/detail/MaxHistorySize.h>

+ Inheritance diagram for MaxHistorySize:

Public Member Functions

long getMaxHistorySize () const
 
size_t getTruncateMaxBatchSize () const
 
size_t getUnlimitedHistoryWarningThreshold () const
 
void setMaxHistorySize (long maxSize, const std::string &additionalInfo="")
 Set the maximum number of snapshots to be contained in an entity.
 
void setTruncateMaxBatchSize (size_t batchSize)
 Set the maximum number of snapshots to remove per truncate() call.
 
void setUnlimitedHistoryWarningThreshold (size_t threshold)
 Set the threshold for warning about unlimited history growth.
 

Protected Attributes

long _maxHistorySize = 120000
 Maximum size of entity histories.
 
size_t _truncateMaxBatchSize = 100
 Maximum number of snapshots to remove per truncate() call.
 
size_t _unlimitedHistoryWarningThreshold = 500000
 Threshold for warning about unlimited history growth.
 

Detailed Description

Definition at line 7 of file MaxHistorySize.h.

Member Function Documentation

◆ getMaxHistorySize()

long getMaxHistorySize ( ) const

Definition at line 32 of file MaxHistorySize.cpp.

+ Here is the caller graph for this function:

◆ getTruncateMaxBatchSize()

size_t getTruncateMaxBatchSize ( ) const

Definition at line 56 of file MaxHistorySize.cpp.

+ Here is the caller graph for this function:

◆ getUnlimitedHistoryWarningThreshold()

size_t getUnlimitedHistoryWarningThreshold ( ) const

Definition at line 44 of file MaxHistorySize.cpp.

+ Here is the caller graph for this function:

◆ setMaxHistorySize()

void setMaxHistorySize ( long maxSize,
const std::string & additionalInfo = "" )

Set the maximum number of snapshots to be contained in an entity.

Affected entities are to be update right away.

Definition at line 8 of file MaxHistorySize.cpp.

+ Here is the caller graph for this function:

◆ setTruncateMaxBatchSize()

void setTruncateMaxBatchSize ( size_t batchSize)

Set the maximum number of snapshots to remove per truncate() call.

This prevents long blocking when many snapshots need to be removed. Set to 0 for unlimited (remove all excess in one call).

Definition at line 50 of file MaxHistorySize.cpp.

+ Here is the caller graph for this function:

◆ setUnlimitedHistoryWarningThreshold()

void setUnlimitedHistoryWarningThreshold ( size_t threshold)

Set the threshold for warning about unlimited history growth.

When maxHistorySize is negative (unlimited) and the number of snapshots exceeds this threshold, a warning will be emitted. Set to 0 to disable the warning.

Definition at line 38 of file MaxHistorySize.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ _maxHistorySize

long _maxHistorySize = 120000
protected

Maximum size of entity histories.

If negative, the size of history is not limited. Default: 120,000 snapshots (10 minutes at 200Hz).

See also
Entity::maxHstorySize

Definition at line 47 of file MaxHistorySize.h.

◆ _truncateMaxBatchSize

size_t _truncateMaxBatchSize = 100
protected

Maximum number of snapshots to remove per truncate() call.

Limits blocking time when many snapshots exceed the limit. Set to 0 for unlimited. Default: 100 snapshots per call.

Definition at line 62 of file MaxHistorySize.h.

◆ _unlimitedHistoryWarningThreshold

size_t _unlimitedHistoryWarningThreshold = 500000
protected

Threshold for warning about unlimited history growth.

When maxHistorySize < 0 and container size exceeds this value, a throttled warning is emitted. Set to 0 to disable. Default: 500,000 snapshots.

Definition at line 55 of file MaxHistorySize.h.


The documentation for this class was generated from the following files: