public class MemoryHomePageExecutor extends java.lang.Object implements HomePageExecutor
构造器和说明 |
---|
MemoryHomePageExecutor() |
限定符和类型 | 方法和说明 |
---|---|
void |
buildCache()
初始化首页缓存
|
void |
cache(HomePage homepage)
缓存首页
|
void |
clearCache()
清理所有的缓存信息
|
boolean |
containCache(long homepageId)
缓存中是否指定ID的首页
|
JSONArray |
getAllHomePageInfo()
获取所有首页信息
|
java.util.List<HomePage> |
getAllHomePages()
获取所有首页
|
HomePage[] |
getAllHomePagesSorted()
获取排序后的所有首页
|
java.lang.Class |
getClassKey()
缓存器的class标识
|
HomePage |
getHomePage(long id)
获取缓存的首页
|
int |
getHomePageCount()
获取首页列表的大小
|
JSONObject |
getHomePageInfo(long id)
根据ID获取首页信息
|
static HomePageExecutor |
getInstance() |
void |
rebuildCache()
重新初始化
|
void |
removeCache(long id)
重缓存中删除指定首页
|
public static HomePageExecutor getInstance()
public void buildCache() throws java.lang.Exception
buildCache
在接口中 CacheExecutor
java.lang.Exception
public void rebuildCache() throws java.lang.Exception
rebuildCache
在接口中 CacheExecutor
java.lang.Exception
- 异常public boolean containCache(long homepageId)
containCache
在接口中 HomePageExecutor
homepageId
- 首页IDpublic int getHomePageCount()
getHomePageCount
在接口中 HomePageExecutor
public java.util.List<HomePage> getAllHomePages()
getAllHomePages
在接口中 HomePageExecutor
public HomePage[] getAllHomePagesSorted()
getAllHomePagesSorted
在接口中 HomePageExecutor
public JSONArray getAllHomePageInfo() throws JSONException
getAllHomePageInfo
在接口中 HomePageExecutor
JSONException
public HomePage getHomePage(long id)
getHomePage
在接口中 HomePageExecutor
id
- 首页IDpublic JSONObject getHomePageInfo(long id) throws java.lang.Exception
getHomePageInfo
在接口中 HomePageExecutor
id
- 首页IDjava.lang.Exception
public void cache(HomePage homepage)
cache
在接口中 HomePageExecutor
homepage
- 被缓存的首页对象public void removeCache(long id)
removeCache
在接口中 HomePageExecutor
id
- 被删除首页的IDpublic void clearCache() throws java.lang.Exception
CacheExecutor
clearCache
在接口中 CacheExecutor
java.lang.Exception
public java.lang.Class getClassKey()
CacheExecutor
getClassKey
在接口中 CacheExecutor