public class EhcacheRepoProvider
extends java.lang.Object
Temporary storage resources based on Ehcache
Constructor and Description |
---|
EhcacheRepoProvider() |
Modifier and Type | Method and Description |
---|---|
boolean |
contain(java.lang.String groupId, java.lang.String id)
Contains the temporary resource object
|
void |
destroy()
Destroy the warehouse
|
java.lang.Object |
get(java.lang.String groupId, java.lang.String cacheId)
Gets the temporary resource object
|
java.util.List<java.lang.String> |
getAllStatusKeys(java.lang.String groupId)
Gets the key-value list of all temporary resources
|
java.util.Map<java.lang.String,java.lang.Object> |
getAllStatusObject(java.lang.String groupId)
Gets all the mapping of temporary resources in the specified group
|
boolean |
init(RepositorySetting setting)
Initialize the temporary storage settings
|
boolean |
remove(java.lang.String groupId, java.lang.String id)
Deletes the temporary resource object
|
boolean |
save(java.lang.String groupId, java.lang.String cacheId, java.lang.Object obj, int expire)
Store the temporary resource
|
boolean |
update(java.lang.String groupId, java.lang.String id, java.lang.Object toUpdate)
Updates the temporary resource object
|
public boolean init(RepositorySetting setting)
Initialize the temporary storage settings
setting
-public java.lang.Object get(java.lang.String groupId, java.lang.String cacheId)
Gets the temporary resource object
groupId
-cacheId
-public boolean contain(java.lang.String groupId, java.lang.String id)
Contains the temporary resource object
groupId
-id
-public boolean save(java.lang.String groupId, java.lang.String cacheId, java.lang.Object obj, int expire)
Store the temporary resource
groupId
-cacheId
-obj
-expire
- Saving time. The unit is the secondpublic java.util.Map<java.lang.String,java.lang.Object> getAllStatusObject(java.lang.String groupId)
Gets all the mapping of temporary resources in the specified group
groupId
-public java.util.List<java.lang.String> getAllStatusKeys(java.lang.String groupId)
Gets the key-value list of all temporary resources
groupId
-public boolean update(java.lang.String groupId, java.lang.String id, java.lang.Object toUpdate)
Updates the temporary resource object
groupId
-id
-toUpdate
-public boolean remove(java.lang.String groupId, java.lang.String id)
Deletes the temporary resource object
groupId
-id
-public void destroy()
Destroy the warehouse