org.nnsoft.sameas4j.cache
Interface Cache

All Known Implementing Classes:
InMemoryCache

public interface Cache

Simple cache interface for sameas service.


Method Summary
<T> T
get(CacheKey cacheKey, Class<T> type)
          Retrieves an object from the cache.
<T> void
put(CacheKey cacheKey, T cacheValue)
          Add a new entry in the cache.
 

Method Detail

put

<T> void put(CacheKey cacheKey,
             T cacheValue)
Add a new entry in the cache.

Type Parameters:
T - The stored object type
Parameters:
cacheKey - The cache key
cacheValue - The stored object

get

<T> T get(CacheKey cacheKey,
          Class<T> type)
Retrieves an object from the cache.

Type Parameters:
T - The stored object type
Parameters:
cacheKey - The cache key
type - The stored object
Returns:
The stored object if any, null otherwise


Copyright © 2009-2012 99 Software Foundation. All Rights Reserved.