public class MockDwzLogStoreImpl extends Object implements IDwzLogStore
IDwzLogStoreSEQ_NAME__DWZ_LOG_ID| Constructor and Description |
|---|
MockDwzLogStoreImpl(icu.easyj.core.sequence.ISequenceService sequenceService) |
| 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()
更新超时的短链接数据状态
|
public MockDwzLogStoreImpl(icu.easyj.core.sequence.ISequenceService sequenceService)
@NonNull public DwzLogEntity save(@NonNull String longUrl, Date termOfValidity)
IDwzLogStoresave in interface IDwzLogStorelongUrl - 长链接termOfValidity - 有效期截止时间(为空表示永久有效)@Nullable public DwzLogEntity getByLongUrlForUpdate(@NonNull String longUrl)
IDwzLogStoregetByLongUrlForUpdate in interface IDwzLogStorelongUrl - 长链接public void update(@NonNull
DwzLogEntity dwzLog)
IDwzLogStoreupdate in interface IDwzLogStoredwzLog - 短链接记录@Nullable public String getLongUrlByShortUrlCode(@NonNull String shortUrlCode)
IDwzLogStoregetLongUrlByShortUrlCode in interface IDwzLogStoreshortUrlCode - 短链接码@Nullable public Long getMaxId()
IDwzLogStoregetMaxId in interface IDwzLogStorepublic int deleteOvertime()
IDwzLogStoredeleteOvertime in interface IDwzLogStorepublic int updateOvertime()
IDwzLogStoreupdateOvertime in interface IDwzLogStoreCopyright © 2021–2022 EasyJ????. All rights reserved.