com.xerox.amazonws.simpledb
Interface ItemCache

All Known Implementing Classes:
SimpleItemCache

public interface ItemCache

This interface describes calls that the Domain will make into a caching system. For now, only items are cached by id.


Method Summary
 void clear()
          Clears the cache.
 Item getItem(String id)
          This retrieves an item from the cache.
 List<Item> itemSet()
          Retrieves a complete list of items in the cache
 void putItem(Item i)
          Stores an item in the cache.
 void removeItem(String id)
          Removes an item from the cache.
 

Method Detail

getItem

Item getItem(String id)
This retrieves an item from the cache. A null is returned if the item is not cachced.

Parameters:
id - the identifier for the item being retrieved
Returns:
the item found (or null)

putItem

void putItem(Item i)
Stores an item in the cache.

Parameters:
i - the item to be stored

removeItem

void removeItem(String id)
Removes an item from the cache.

Parameters:
id - the identifier for the item being removed

itemSet

List<Item> itemSet()
Retrieves a complete list of items in the cache


clear

void clear()
Clears the cache. This would be used to ensure only new data is being fetched.