public interface SessionService extends AppService
defaultServiceProperty
ANALYTICS_SERVICE, CACHE_MANAGER, CONFIG_SERVICE, CRASH_SERVICE, DOWNLOAD_MANAGER, LOCATION_SERVICE, OBSERVER_MANAGER, ROUTE_SERVICE, SESSION_SERVICE, STATUS_SERVICE, UPGRADE_SERVICE
限定符和类型 | 方法和说明 |
---|---|
void |
clearAll()
清除磁盘缓存和内存缓存
|
boolean |
containsKey(String key)
是否包含
|
boolean |
containsValue(Object value)
是否包含
|
Object |
get(String key)
获取缓存Object
|
boolean |
getBoolean(String key,
boolean defValue)
获取Boolean
|
float |
getFloat(String key,
float defValue)
获取Float
|
int |
getInt(String key,
int defValue)
获取Int
|
JSONArray |
getJSONArray(String key)
获取JSONArray缓存
|
JSONObject |
getJSONObject(String key)
获取JSONObject缓存
|
long |
getLong(String key,
long defValue)
获取Long
|
Serializable |
getSerializable(String key)
获取Serializable缓存
|
String |
getString(String key,
String defValue)
获取String
|
Set<String> |
getStringSet(String key,
Set<String> defValue)
获取String
|
Session |
getUserSession(String name)
获取用户Session
|
void |
put(String key,
Object value)
缓存Object到内存
|
void |
putAll(Map<String,?> map)
缓存map到内存
|
void |
refresh()
刷新磁盘缓存和内存缓存
|
void |
remove(String key)
删除磁盘缓存和内存缓存
|
void |
saveAll(Map<String,?> map)
存储map到内存和磁盘
|
void |
saveBoolean(String key,
boolean value)
存储boolean到内存和磁盘
|
void |
saveFloat(String key,
float value)
存储Float到内存和磁盘
|
void |
saveInt(String key,
int value)
存储int到内存和磁盘
|
void |
saveJSONArray(String key,
JSONArray value)
存储JSONArray到内存和磁盘
|
void |
saveJSONObject(String key,
JSONObject value)
存储JSONObject到内存和磁盘
|
void |
saveLong(String key,
long value)
存储long到内存和磁盘
|
void |
saveSerializable(String key,
Serializable value)
存储Serializable到内存和磁盘
|
void |
saveString(String key,
String value)
存储String到内存和磁盘
|
void |
saveStringSet(String key,
Set<String> value)
存储StringSet到内存和磁盘
|
defaultServiceProperty, getName, getServiceProperty, init, onCreate, onDestroy, setDebug
boolean containsKey(String key)
key
- boolean containsValue(Object value)
value
- int getInt(String key, int defValue)
key
- boolean getBoolean(String key, boolean defValue)
key
- long getLong(String key, long defValue)
key
- float getFloat(String key, float defValue)
key
- JSONObject getJSONObject(String key)
key
- JSONArray getJSONArray(String key)
key
- Serializable getSerializable(String key)
key
- void saveInt(String key, int value)
key
- void saveBoolean(String key, boolean value)
key
- void saveFloat(String key, float value)
key
- void saveLong(String key, long value)
key
- void saveJSONObject(String key, JSONObject value)
key
- void saveJSONArray(String key, JSONArray value)
key
- void saveSerializable(String key, Serializable value)
key
- void remove(String key)
key
- void refresh()
void clearAll()