DVOCacher¶
-
public interface
DVOCacher
¶ The
DVOCacher
is a component that caches the DVO(s) into partiular format designated in the sub-class. To store DVO that have multiple key, it is recommended to combine the key as a string by a separator “_”. For example, If the messageDVO has the key message_id and message_box, You should use combined key message_id_message_box. Creation Date: 12/2/2007Author: Twinsen Tsang
Methods¶
activeSize¶
-
int
activeSize
()¶ The activs size is defined how many DVO are already stored in the cacher.
Returns: Get the active size of DVO cacher.
efficieny¶
-
double
efficieny
()¶ This method is used to calculate the
getDVO(String)
efficieny (eff) of the cacher. It is formulated :cacheHit eff = (--------------------) * 100 cacheHit + cacheMiss
Returns: the efficiency of the cacher.
getDVO¶
maxSize¶
-
int
maxSize
()¶ The maximum size is defined how many DVO are the cacher can store before swapping out happens.
Returns: Get the maximum size of DVO cacher.
putDVO¶
-
void
putDVO
(String key, DVO cacheItem)¶ Store the DVO
cacheItem
into the cacher with the specifiedKey
. If the DVO in thekey
is already exist, it throws CacheException indicating cache duplication.Parameters: - key – The key field of the DVO.
- cacheItem – The DVO item to be cached.
Throws: - CacheException – when the record is already exist.
See also:
.putOrUpdateDVO(String,DVO);