com.ibatis.sqlmap.engine.cache.fifo

Class FifoCacheController

public class FifoCacheController extends Object implements CacheController

FIFO (first in, first out) cache controller implementation
Constructor Summary
FifoCacheController()
Default constructor
Method Summary
voidflush(CacheModel cacheModel)
Flushes the cache.
intgetCacheSize()
ObjectgetObject(CacheModel cacheModel, Object key)
Get an object out of the cache.
voidputObject(CacheModel cacheModel, Object key, Object value)
Add an object to the cache
ObjectremoveObject(CacheModel cacheModel, Object key)
voidsetCacheSize(int cacheSize)
voidsetProperties(Properties props)
Configures the cache

Constructor Detail

FifoCacheController

public FifoCacheController()
Default constructor

Method Detail

flush

public void flush(CacheModel cacheModel)
Flushes the cache.

Parameters: cacheModel The cache model

getCacheSize

public int getCacheSize()

getObject

public Object getObject(CacheModel cacheModel, Object key)
Get an object out of the cache.

Parameters: cacheModel The cache model key The key of the object to be returned

Returns: The cached object (or null)

putObject

public void putObject(CacheModel cacheModel, Object key, Object value)
Add an object to the cache

Parameters: cacheModel The cacheModel key The key of the object to be cached value The object to be cached

removeObject

public Object removeObject(CacheModel cacheModel, Object key)

setCacheSize

public void setCacheSize(int cacheSize)

setProperties

public void setProperties(Properties props)
Configures the cache

Parameters: props Optionally can contain properties [reference-type=WEAK|SOFT|STRONG]

Copyright © 2011. All Rights Reserved.