Result - 返回值的类型
Return type
public static interface LockTemplate.LockBlock<Result>
为了使用更加优雅,特意加入了接口,这样可以使用 Lambda 表达式
To be graceful, this interface will be replace by Lambda
Result doInLock() throws java.lang.Throwable
这个方法中的操作时线程安全的
The operations in this method is safe
返回执行结果
Return result
java.lang.Throwable - 如果执行出现异常
If execute meets error
Copyright © 2019. All Rights Reserved.