public interface IDwzLogStore
| Modifier and Type | Field and Description |
|---|---|
static String |
SEQ_NAME__DWZ_LOG_ID
生成短链接记录ID的序列名
|
| Modifier and Type | Method and Description |
|---|---|
int |
deleteOvertime()
删除超时的短链接数据
|
DwzLogEntity |
getByLongUrlForUpdate(String longUrl)
根据长链接,获取有效的短链接记录数据。主要用于避免同一长链接重复创建多条数据。
|
String |
getLongUrlByShortUrlCode(String shortUrlCode)
根据短链接码,获取长链接
|
Long |
getMaxId()
获取当前存储器中保存的短链接记录的最大ID值
|
DwzLogEntity |
save(String longUrl,
Date termOfValidity)
关联短链接码与长链接,并保存到store中
|
void |
update(DwzLogEntity dwzLog)
更新成功
|
int |
updateOvertime()
更新超时的短链接数据状态
|
static final String SEQ_NAME__DWZ_LOG_ID
@NonNull DwzLogEntity save(@NonNull String longUrl, @Nullable Date termOfValidity)
longUrl - 长链接termOfValidity - 有效期截止时间(为空表示永久有效)icu.easyj.data.store.StoreException - 存储接口异常@Nullable DwzLogEntity getByLongUrlForUpdate(@NonNull String longUrl)
longUrl - 长链接icu.easyj.data.store.StoreException - 存储接口异常void update(@NonNull
DwzLogEntity dwzLog)
dwzLog - 短链接记录icu.easyj.data.store.StoreException - 存储接口异常@Nullable String getLongUrlByShortUrlCode(@NonNull String shortUrlCode)
shortUrlCode - 短链接码icu.easyj.data.store.StoreException - 存储接口异常@Nullable Long getMaxId()
icu.easyj.core.exception.NotSupportedException - 如果当前存储器无法获取最大ID值,请抛出该异常int deleteOvertime()
int updateOvertime()
Copyright © 2021–2022 EasyJ????. All rights reserved.