|
|||||||||
| Home >> All >> org >> javahispano >> canyamo >> util >> [ cache overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.javahispano.canyamo.util.cache
Class AbstractCache

java.lang.Objectorg.javahispano.canyamo.util.cache.BasicAbstractCache
org.javahispano.canyamo.util.cache.AbstractCache
- All Implemented Interfaces:
- Cache
- public abstract class AbstractCache
- extends BasicAbstractCache
Implementacion abstracta de una cahce a la que le falta el metodo que carga nuevos elementos.
- Since:
- Version:
| Field Summary | |
protected int |
cacheSize
Description of the Field |
protected java.util.HashMap |
elements
Elmentos en la cache |
protected java.util.List |
fifo
Cola para indicar que elementos entran/salen del cache |
| Constructor Summary | |
AbstractCache(int size)
Constructor for the UserCache object |
|
| Method Summary | |
void |
add(java.lang.Object key,
java.lang.Object element)
Anyade el elemento dado a la cache con la clave dada. |
java.lang.Object |
get(java.lang.Object key)
Devuelve el elemento referenciado de la cache. |
abstract java.lang.Object |
getData(java.lang.Object key)
Metodo que se encargara de cargar el elemtno referenciado cuando no este en la cache |
protected void |
refreshCache(java.lang.Object key)
Refresca el valor de la cahce, siguiendo un patron FIFO. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
elements
protected java.util.HashMap elements
- Elmentos en la cache
fifo
protected java.util.List fifo
- Cola para indicar que elementos entran/salen del cache
cacheSize
protected int cacheSize
- Description of the Field
| Constructor Detail |
AbstractCache
public AbstractCache(int size)
- Constructor for the UserCache object
- Since:
| Method Detail |
get
public java.lang.Object get(java.lang.Object key) throws java.lang.Exception
- Devuelve el elemento referenciado de la cache. Si no existe intentara
cargarlo por medio del metodo abstracto
getDataque debera ser implementado.- Specified by:
getin interfaceCache- Specified by:
getin classBasicAbstractCache
- Since:
getData
public abstract java.lang.Object getData(java.lang.Object key) throws java.lang.Exception
- Metodo que se encargara de cargar el elemtno referenciado cuando no este
en la cache
- Since:
add
public void add(java.lang.Object key, java.lang.Object element)
refreshCache
protected void refreshCache(java.lang.Object key)
- Refresca el valor de la cahce, siguiendo un patron FIFO.
Esto significa que se eliminiran de la cache los elemetnos mas viejos.- Since:
|
|||||||||
| Home >> All >> org >> javahispano >> canyamo >> util >> [ cache overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC