com.supermap.services.rest.repository
Class EhcacheRepoProvider
- java.lang.Object
-
- com.supermap.services.rest.repository.EhcacheRepoProvider
-
public class EhcacheRepoProvider extends java.lang.ObjectTemporary storage resources based on Ehcache
- Since:
- 8.0.0
-
-
Constructor Summary
Constructors Constructor and Description EhcacheRepoProvider()
-
Method Summary
Methods Modifier and Type Method and Description booleancontain(java.lang.String groupId, java.lang.String id)Contains the temporary resource objectvoiddestroy()Destroy the warehousejava.lang.Objectget(java.lang.String groupId, java.lang.String cacheId)Gets the temporary resource objectjava.util.List<java.lang.String>getAllStatusKeys(java.lang.String groupId)Gets the key-value list of all temporary resourcesjava.util.Map<java.lang.String,java.lang.Object>getAllStatusObject(java.lang.String groupId)Gets all the mapping of temporary resources in the specified groupbooleaninit(RepositorySetting setting)Initialize the temporary storage settingsbooleanremove(java.lang.String groupId, java.lang.String id)Deletes the temporary resource objectbooleansave(java.lang.String groupId, java.lang.String cacheId, java.lang.Object obj, int expire)Store the temporary resourcebooleanupdate(java.lang.String groupId, java.lang.String id, java.lang.Object toUpdate)Updates the temporary resource object
-
-
-
Method Detail
-
init
public boolean init(RepositorySetting setting)
Initialize the temporary storage settings
- Parameters:
setting-- Returns:
- Since:
- 8.0.0
-
get
public java.lang.Object get(java.lang.String groupId, java.lang.String cacheId)Gets the temporary resource object
- Parameters:
groupId-cacheId-- Returns:
- Temporary resource object
- Since:
- 8.0.0
-
contain
public boolean contain(java.lang.String groupId, java.lang.String id)Contains the temporary resource object
- Parameters:
groupId-id-- Returns:
- Whether to contain
- Since:
- 8.0.0
-
save
public boolean save(java.lang.String groupId, java.lang.String cacheId, java.lang.Object obj, int expire)Store the temporary resource
- Parameters:
groupId-cacheId-obj-expire- Saving time. The unit is the second- Returns:
- Whether the storage is successful
- Since:
- 8.0.0
-
getAllStatusObject
public 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
- Parameters:
groupId-- Returns:
- All the mapping of temporary resources in the specified group
- Since:
- 8.0.0
-
getAllStatusKeys
public java.util.List<java.lang.String> getAllStatusKeys(java.lang.String groupId)
Gets the key-value list of all temporary resources
- Parameters:
groupId-- Returns:
- Returns the key-value list of all temporary resources
- Since:
- 8.0.0
-
update
public boolean update(java.lang.String groupId, java.lang.String id, java.lang.Object toUpdate)Updates the temporary resource object
- Parameters:
groupId-id-toUpdate-- Returns:
- If it is updated successfully
- Since:
- 8.0.0
-
remove
public boolean remove(java.lang.String groupId, java.lang.String id)Deletes the temporary resource object
- Parameters:
groupId-id-- Returns:
- If it is deleted successfully or not.
- Since:
- 8.0.0
-
destroy
public void destroy()
Destroy the warehouse
- Since:
- 8.0.0
-
-