Package com.zing.zalo.zbrowser.cache
Class MiniProgramDataStorage
- java.lang.Object
-
- com.zing.zalo.zbrowser.cache.MiniProgramDataStorage
-
public class MiniProgramDataStorage extends Object
Created by hoangdv4 on 25/03/2021.
-
-
Field Summary
Fields Modifier and Type Field Description static intCACHE_CREATE_FAILEDstatic intCACHE_EXPIREDstatic intCACHE_OUT_OF_MEMORYstatic intINVALID_VALUEstatic intKEY_EXPIREDstatic intKEY_NOT_FOUND
-
Constructor Summary
Constructors Constructor Description MiniProgramDataStorage(String diskStorageDirectory, String appId, long diskStorageSizeBytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()voidclose()booleandelete(String key)Stringget(String key)longgetSize()booleanput(String key, String value)voidremoveErrorListener(com.zing.zalo.zbrowser.cache.MiniProgramDataStorage.ErrorListener errorListener)voidsetOnErrorListener(com.zing.zalo.zbrowser.cache.MiniProgramDataStorage.ErrorListener errorListener)
-
-
-
Field Detail
-
CACHE_OUT_OF_MEMORY
public static final int CACHE_OUT_OF_MEMORY
- See Also:
- Constant Field Values
-
CACHE_EXPIRED
public static final int CACHE_EXPIRED
- See Also:
- Constant Field Values
-
CACHE_CREATE_FAILED
public static final int CACHE_CREATE_FAILED
- See Also:
- Constant Field Values
-
KEY_NOT_FOUND
public static final int KEY_NOT_FOUND
- See Also:
- Constant Field Values
-
KEY_EXPIRED
public static final int KEY_EXPIRED
- See Also:
- Constant Field Values
-
INVALID_VALUE
public static final int INVALID_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
delete
public boolean delete(String key)
-
clear
public void clear()
-
getSize
public long getSize()
-
close
public void close()
-
setOnErrorListener
public void setOnErrorListener(com.zing.zalo.zbrowser.cache.MiniProgramDataStorage.ErrorListener errorListener)
-
removeErrorListener
public void removeErrorListener(com.zing.zalo.zbrowser.cache.MiniProgramDataStorage.ErrorListener errorListener)
-
-