Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.table.cache
Interface Cache

All Known Subinterfaces:
TableCache, TreeTableCache
All Known Implementing Classes:
AbstractCache, AbstractDatabaseTreeTableModel.DefaultTreeTableAggregateRowCache, AbstractGroupCache, AbstractTableCache, AbstractTreeTableCache, DefaultGroupCache, DefaultTableCache, DefaultTreeTableCache

public interface Cache

Cache is an interface that defines methods for retrieving and putting objects in a cache store.


Method Summary
 Object get(Object key)
          Retrieves a value from the cache.
 boolean isValueCached(Object key)
          Determines whether the value specificed by key is cached.
 void put(Object key, Object value)
          Inserts a value in the cache store.
 Object remove(Object key)
          Removes a value from the cache store.
 void removeAll()
          Clears the cache.
 

Method Detail

get

Object get(Object key)
Retrieves a value from the cache. If the value is not cached, this method retrieves the uncached value and inserts it in the cache store.

Parameters:
key - an object whose associated value is cached.
Returns:
the value to which key is associated.

isValueCached

boolean isValueCached(Object key)
Determines whether the value specificed by key is cached.

Parameters:
key - an object whose associated value is cached.
Returns:
true if the value is cached.

put

void put(Object key,
         Object value)
Inserts a value in the cache store.

Parameters:
key - an object whose associated value is cached.
value - the value to cache.

removeAll

void removeAll()
Clears the cache.


remove

Object remove(Object key)
Removes a value from the cache store.

Parameters:
key - an object whose associated value is cached.

Copyright © 2011 Citra Technologies. All Rights Reserved.