Package | Description |
---|---|
cn.trinea.android.common.dao | |
cn.trinea.android.common.dao.impl | |
cn.trinea.android.common.service.impl | |
cn.trinea.android.common.util |
Class and Description |
---|
ImageSDCardCache
Image SDCard Cache
It applies to images those uesd frequently and their size is big that we cannot store too much in memory, like pictures of twitter or sina weibo. |
Class and Description |
---|
ImageSDCardCache
Image SDCard Cache
It applies to images those uesd frequently and their size is big that we cannot store too much in memory, like pictures of twitter or sina weibo. |
Class and Description |
---|
FileNameRuleCurrentTime.TimeRule
Time Rule
FileNameRuleCurrentTime.TimeRule.YEAR year of current time, E.g., at 2012-7-6 14:37:58.365 PM result is 2012
FileNameRuleCurrentTime.TimeRule.DAY_OF_MONTH indicating the day of the month. |
FileNameRuleImageUrl
File name rule, used when saving images in
ImageSDCardCache
use image url as file name, replace char with _ if not letter or number
use file suffix in url as target file suffix
use FileNameRuleImageUrl.setFileExtension(String) set file extension
|
ImageCache.CompressListener
set image compress scale
|
ImageMemoryCache
Image Memory Cache
It applies to images those uesd frequently, like users avatar of twitter or sina weibo. |
ImageMemoryCache.OnImageCallbackListener
callback interface when getting image
|
ImageSDCardCache
Image SDCard Cache
It applies to images those uesd frequently and their size is big that we cannot store too much in memory, like pictures of twitter or sina weibo. |
ImageSDCardCache.OnImageSDCallbackListener
callback interface when getting image
|
PreloadDataCache
Preload data cache, It a good choice for network application which need to preload data.
|
PreloadDataCache.OnGetDataListener
get data interface, implements this to get data
|
SimpleCache
Simple Cache
Usage Use one of constructors below to construct cache SimpleCache.setCacheFullRemoveType(CacheFullRemoveType) set remove type when cache is full
SimpleCache.setValidTime(long) set valid time of elements in cache, in mills
SimpleCache.put(Object, CacheObject) or SimpleCache.put(Object, Object) put element
SimpleCache.get(Object) get element
SimpleCache.loadCache(String) restore cache from file
SimpleCache.saveCache(String, SimpleCache) save cache to file
Constructor
SimpleCache.SimpleCache()
SimpleCache.SimpleCache(int)
SimpleCache.loadCache(String) restore cache from file
About hit and miss of the cache
SimpleCache.getHitRate() get hit rate of the cache
SimpleCache.getHitCount() get hit count of the cache
SimpleCache.getMissCount() get miss count of the cache
About size of cache
SimpleCache.getMaxSize() get the maximum capacity of the cache
SimpleCache.getSize() get the number of elements in the cache valid
Other interfaces same to Map
|
Class and Description |
---|
ImageCache
Image Cache
It's a cache with primary cache and secondary cache. |
ImageSDCardCache
Image SDCard Cache
It applies to images those uesd frequently and their size is big that we cannot store too much in memory, like pictures of twitter or sina weibo. |