All Examples  This Package

Class examples.security.rdbmsrealm.LRUTable

java.lang.Object
   |
   +----examples.security.rdbmsrealm.LRUTable

public class LRUTable
extends Object
Class LRUTable stores values by key much like Hashtable. However, only a configurable number of most recently used entries is retained. Also, it is possible to store a null value and to distinguish a cached null value from an absent entry.

Author:
Copyright (c) 1997-1999 by BEA Systems. All Rights Reserved.

Constructor Index

 o LRUTable(int)

Method Index

 o get(Object)
Returns a CacheResult if cached, null if absent.
 o put(Object, Object)
Adds a value.
 o remove(Object)
Removes any value for that key and returns the former CacheResult for that key.

Constructors

 o LRUTable
 public LRUTable(int max)

Methods

 o get
 public CacheResult get(Object key)
Returns a CacheResult if cached, null if absent. The cached value may be null.

 o put
 public CacheResult put(Object key,
                        Object value)
Adds a value. It is considered most recently used. Returns any CacheResult that used to be stored for the same key. If this addition would have caused the table size to exceed its maximum, the least recently use entry is removed.

 o remove
 public CacheResult remove(Object key)
Removes any value for that key and returns the former CacheResult for that key.


All Examples  This Package