alma::acs::logging::MultipleRepeatGuard::BoundedHashMap< K, V > Class Reference

Inheritance diagram for alma::acs::logging::MultipleRepeatGuard::BoundedHashMap< K, V >:
Inheritance graph
[legend]
Collaboration diagram for alma::acs::logging::MultipleRepeatGuard::BoundedHashMap< K, V >:
Collaboration graph
[legend]

List of all members.

Protected Member Functions

boolean removeEldestEntry (Entry eldest)

Package Functions

 BoundedHashMap (int maxEntries, boolean accessOrder)
void setMaxEntries (int maxEntries)

Private Attributes

volatile int maxEntries

Detailed Description

This class could be moved up to module jacsutil later.


Constructor & Destructor Documentation

alma::acs::logging::MultipleRepeatGuard::BoundedHashMap< K, V >::BoundedHashMap ( int  maxEntries,
boolean  accessOrder 
) [inline, package]

Constructor. The initial capacity of this map is determined as Math.min(16, maxEntries). The load factor is taken as 0.75 which is the default for other map types.

Parameters:
maxEntries the maximum capacity of this map.
accessOrder if true, then this map is an LRU (least-recently used) cache that will remove the least recently used entries when the number of stored entries has reached maxEntries and a new entry is stored; otherwise insertion order is used (removing the entry that was inserted first). See LinkedHashMap#LinkedHashMap(int, float, boolean).

Member Function Documentation

boolean alma::acs::logging::MultipleRepeatGuard::BoundedHashMap< K, V >::removeEldestEntry ( Entry  eldest  )  [inline, protected]
void alma::acs::logging::MultipleRepeatGuard::BoundedHashMap< K, V >::setMaxEntries ( int  maxEntries  )  [inline, package]

Sets a new value for the maximum number of entries in this map, overriding the maxEntries value given in the constructor or in previous invocations of this method.

Parameters:
maxEntries must be a positive number

Member Data Documentation

volatile int alma::acs::logging::MultipleRepeatGuard::BoundedHashMap< K, V >::maxEntries [private]

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

Generated by  doxygen 1.6.2