接口 SaSetValueInterface
- 所有超级接口:
SaGetValueInterface
- 所有已知子接口:
SaStorage
- 所有已知实现类:
SaApplication,SaSession
对写值的一组方法封装
- 作者:
- kong
-
方法概要
修饰符和类型方法说明删值default <T> Tget(String key, SaRetFunction fun) 取值 (如果值为 null,则执行 fun 函数获取值,并把函数返回值写入缓存)写值default SaSetValueInterface写值 (只有在此 key 原本无值的情况下才会写入)从接口继承的方法 cn.dev33.satoken.application.SaGetValueInterface
get, get, getDouble, getFloat, getInt, getLong, getModel, getModel, getString, getValueByDefaultValue, has, valueIsNull
-
方法详细资料
-
set
写值- 参数:
key- 名称value- 值- 返回:
- 对象自身
-
delete
删值- 参数:
key- 要删除的key- 返回:
- 对象自身
-
get
取值 (如果值为 null,则执行 fun 函数获取值,并把函数返回值写入缓存)- 类型参数:
T- 返回值的类型- 参数:
key- keyfun- 值为null时执行的函数- 返回:
- 值
-
setByNull
写值 (只有在此 key 原本无值的情况下才会写入)- 参数:
key- 名称value- 值- 返回:
- 对象自身
-