Expresso 5-6

com.jcorporate.expresso.core.cache
Class OrderedCache

java.lang.Object
  extended bycom.jcorporate.expresso.core.cache.OrderedCache
All Implemented Interfaces:
Cache

public class OrderedCache
extends Object
implements Cache

Insert the type's description here. Creation date: (9/7/00 11:42:43 AM)

Author:
Administrator

Constructor Summary
OrderedCache()
          OrderedCache constructor comment.
 
Method Summary
 void addItem(CacheEntry newItem)
          addItem method comment.
 void clear()
          clear method comment.
 CacheEntry getCacheEntry(String itemKey)
          Retrieve the low-level CacheEntry for the cache.
 Cacheable getItem(String itemKey)
          removeItem method comment.
 int getItemCount()
          getItemCount method comment.
 Vector getItems()
          Retrieves all the items in this cache May return an empty Vector if the cache contents have expired.
 String getName()
          getName method comment.
 long getUsedCount()
          getUsedCount method comment.
 boolean isOrdered()
          Retrieve whether the cache instance is an ordered cache [list based] or unordered cache.
 void removeItem(Cacheable oldItem)
          removeItem method comment.
 void setItems(List newItems)
          Eventually the new way to set items
 void setItems(Vector newItems)
          getItemCount method comment.
 void setMaxSize(int newMaxSize)
          setName method comment.
 void setName(String newName)
          setName method comment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderedCache

public OrderedCache()
OrderedCache constructor comment.

Method Detail

addItem

public void addItem(CacheEntry newItem)
addItem method comment.

Specified by:
addItem in interface Cache
Parameters:
newItem - New item to add.

clear

public void clear()
clear method comment.

Specified by:
clear in interface Cache

getCacheEntry

public CacheEntry getCacheEntry(String itemKey)
Retrieve the low-level CacheEntry for the cache. This is particularly useful for debugging or management.

Specified by:
getCacheEntry in interface Cache
Parameters:
itemKey - the cache key to retrieve
Returns:
the CacheEntry for the cache or null.

getItem

public Cacheable getItem(String itemKey)
removeItem method comment.

Specified by:
getItem in interface Cache
Parameters:
itemKey - The item key
Returns:
the Cacheable entry

getItemCount

public int getItemCount()
getItemCount method comment.

Specified by:
getItemCount in interface Cache
Returns:
the item count

getItems

public Vector getItems()
Retrieves all the items in this cache May return an empty Vector if the cache contents have expired.

Specified by:
getItems in interface Cache
Returns:
the actual items or null if no items exist in the cache.

getName

public String getName()
getName method comment.

Specified by:
getName in interface Cache
Returns:
the cache name

getUsedCount

public long getUsedCount()
getUsedCount method comment.

Specified by:
getUsedCount in interface Cache
Returns:
the useage count

isOrdered

public boolean isOrdered()
Retrieve whether the cache instance is an ordered cache [list based] or unordered cache. [map based]

Specified by:
isOrdered in interface Cache
Returns:
true if the cache is an ordered cache.

removeItem

public void removeItem(Cacheable oldItem)
removeItem method comment.

Specified by:
removeItem in interface Cache
Parameters:
oldItem - the old item to remove

setItems

public void setItems(List newItems)
              throws CacheException
Eventually the new way to set items

Specified by:
setItems in interface Cache
Parameters:
newItems - the new items to add
Throws:
CacheException - upon error

setItems

public void setItems(Vector newItems)
              throws CacheException
getItemCount method comment.

Specified by:
setItems in interface Cache
Parameters:
newItems - the new items to add
Throws:
CacheException - If there's an error setting the new items in the cache

setMaxSize

public void setMaxSize(int newMaxSize)
setName method comment.

Specified by:
setMaxSize in interface Cache
Parameters:
newMaxSize - the new maximum size for the cache

setName

public void setName(String newName)
setName method comment.

Specified by:
setName in interface Cache
Parameters:
newName - The new cache name

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.