Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.ibatis.sqlmap.engine.cache.fifo
Class FifoCacheController  view FifoCacheController download FifoCacheController.java

java.lang.Object
  extended bycom.ibatis.sqlmap.engine.cache.fifo.FifoCacheController
All Implemented Interfaces:
com.ibatis.sqlmap.engine.cache.CacheController

public class FifoCacheController
extends java.lang.Object
implements com.ibatis.sqlmap.engine.cache.CacheController

FIFO (first in, first out) cache controller implementation


Field Summary
private  java.util.Map cache
           
private  int cacheSize
           
private  java.util.List keyList
           
 
Constructor Summary
FifoCacheController()
          Default constructor
 
Method Summary
 void configure(java.util.Properties props)
          Configures the cache
 void flush(com.ibatis.sqlmap.engine.cache.CacheModel cacheModel)
          Flushes the cache.
 java.lang.Object getObject(com.ibatis.sqlmap.engine.cache.CacheModel cacheModel, java.lang.Object key)
          Get an object out of the cache.
 void putObject(com.ibatis.sqlmap.engine.cache.CacheModel cacheModel, java.lang.Object key, java.lang.Object value)
          Add an object to the cache
 java.lang.Object removeObject(com.ibatis.sqlmap.engine.cache.CacheModel cacheModel, java.lang.Object key)
          Remove an object from a cache model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cacheSize

private int cacheSize

cache

private java.util.Map cache

keyList

private java.util.List keyList
Constructor Detail

FifoCacheController

public FifoCacheController()
Default constructor

Method Detail

configure

public void configure(java.util.Properties props)
Configures the cache

Specified by:
configure in interface com.ibatis.sqlmap.engine.cache.CacheController

putObject

public void putObject(com.ibatis.sqlmap.engine.cache.CacheModel cacheModel,
                      java.lang.Object key,
                      java.lang.Object value)
Add an object to the cache

Specified by:
putObject in interface com.ibatis.sqlmap.engine.cache.CacheController

getObject

public java.lang.Object getObject(com.ibatis.sqlmap.engine.cache.CacheModel cacheModel,
                                  java.lang.Object key)
Get an object out of the cache.

Specified by:
getObject in interface com.ibatis.sqlmap.engine.cache.CacheController

removeObject

public java.lang.Object removeObject(com.ibatis.sqlmap.engine.cache.CacheModel cacheModel,
                                     java.lang.Object key)
Description copied from interface: com.ibatis.sqlmap.engine.cache.CacheController
Remove an object from a cache model

Specified by:
removeObject in interface com.ibatis.sqlmap.engine.cache.CacheController

flush

public void flush(com.ibatis.sqlmap.engine.cache.CacheModel cacheModel)
Flushes the cache.

Specified by:
flush in interface com.ibatis.sqlmap.engine.cache.CacheController