public class

LRUHashList

extends Object
implements Serializable
java.lang.Object
   ↳ com.microstrategy.utils.LRUHashList

Class Overview

A simple HashList wrapper where entries expire on a LRU basis.

Summary

Public Constructors
LRUHashList(int capacity)
Constructor.
Public Methods
void clear()
Clear the LRUHashList.
Object get(Object key)
Returns the object contained with the specified key in the collection.
void load(String value)
Load the string representation of the LRUHashList.
void put(Object key, Object value)
Adds or replaces the object, with the specified key, into the collection.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public LRUHashList (int capacity)

Constructor.

Parameters
capacity The size of LRUHashList. LRU algorithm is used for replacement if the capacity is reached.

Public Methods

public void clear ()

Clear the LRUHashList.

public Object get (Object key)

Returns the object contained with the specified key in the collection.

Parameters
key The key of the item in the collection to get.

public void load (String value)

Load the string representation of the LRUHashList. The string representation of the LRUHashList is a ";" separated name : value pairs. Such as "name:value;name2:value2;". If this method if used, the key and value in the LRUHashList are all strings.

Parameters
value The string representation of the LRUHashList.

public void put (Object key, Object value)

Adds or replaces the object, with the specified key, into the collection.

Parameters
key The key used to identify the object in the collection.
value The object to add to the collection.

public String toString ()

Returns
  • Returns the string representation of the LRUHashList.