The HistoryStore can be restricted by a maximum number of entries. This can be performed via an operation on the agent's ConfigMBean.
Beside this number it should be possible also, to restrict the number restricted based on time, i.e. "keep the values from the last 300 seconds".
This should be possible for attributes and operations.
If both values are given (maxEntries and maxAge) then both have to applied and the most restrictive limitation applies in order to avoid a DOS. As always the globalMaxEntry overrules all.