public class MemoryPostExecutor extends java.lang.Object implements PostExecutor
构造器和说明 |
---|
MemoryPostExecutor() |
限定符和类型 | 方法和说明 |
---|---|
void |
buildCache()
构建缓存信息
|
void |
cache(Post post)
添加职位
|
void |
cacheNewName(long id,
java.lang.String newName)
更新部门职位名称
|
void |
clearCache()
清理所有的缓存信息
|
java.util.List |
getAllPost() |
java.lang.Class |
getClassKey()
缓存器的class标识
|
static PostExecutor |
getInstance() |
Post |
getPost(long id) |
Post |
getPostByName(java.lang.String name) |
java.lang.String |
getPostName(long id) |
void |
rebuildCache()
重新构建缓存信息
|
boolean |
removeCache(long id)
删除部门职位
|
public static PostExecutor getInstance()
public void buildCache()
CacheExecutor
buildCache
在接口中 CacheExecutor
public void rebuildCache()
CacheExecutor
rebuildCache
在接口中 CacheExecutor
public void cache(Post post)
PostExecutor
cache
在接口中 PostExecutor
post
- 部门职位对象public void cacheNewName(long id, java.lang.String newName)
PostExecutor
cacheNewName
在接口中 PostExecutor
id
- 部门idnewName
- 新名称public boolean removeCache(long id) throws java.lang.Exception
PostExecutor
removeCache
在接口中 PostExecutor
id
- 职位idjava.lang.Exception
public Post getPost(long id)
getPost
在接口中 PostExecutor
public Post getPostByName(java.lang.String name)
getPostByName
在接口中 PostExecutor
public java.lang.String getPostName(long id)
getPostName
在接口中 PostExecutor
public java.util.List getAllPost() throws java.lang.Exception
getAllPost
在接口中 PostExecutor
java.lang.Exception
public void clearCache() throws java.lang.Exception
CacheExecutor
clearCache
在接口中 CacheExecutor
java.lang.Exception
public java.lang.Class getClassKey()
CacheExecutor
getClassKey
在接口中 CacheExecutor