org.jmage.cache
Interface Cache

All Known Implementing Classes:
LRUDiskCache, LRUMemoryCache

public interface Cache

Cache


Method Summary
 void destroy()
          Destroy the cache
 void init(java.util.Properties properties)
          Initialize the cache using Properties
 void pageIn(java.lang.Object key, java.lang.Object object)
          Pages an object into the cache, affecting it's cache ranking.
 java.lang.Object pageOut(java.lang.Object key)
          Pages an object out of the cache, affecting it's cache ranking.
 void remove(java.lang.Object key)
          Removes an object from the cache
 

Method Detail

init

void init(java.util.Properties properties)
          throws CacheException
Initialize the cache using Properties

Parameters:
properties -
Throws:
CacheException

pageIn

void pageIn(java.lang.Object key,
            java.lang.Object object)
            throws CacheException
Pages an object into the cache, affecting it's cache ranking.

Parameters:
key - the key
object - the object
Throws:
CacheException

pageOut

java.lang.Object pageOut(java.lang.Object key)
                         throws CacheException
Pages an object out of the cache, affecting it's cache ranking.

Parameters:
key - the object's cache key
Returns:
the object
Throws:
CacheException

remove

void remove(java.lang.Object key)
            throws CacheException
Removes an object from the cache

Parameters:
key - the object's cache key
Throws:
CacheException

destroy

void destroy()
             throws CacheException
Destroy the cache

Throws:
CacheException


Copyright © 2004-2008 Sourceforge. All Rights Reserved.