public class TimeseriesTableOptions extends Object implements Jsonizable
TTL: TimeToLive的缩写, TableStore支持数据自动过期, TimeToLive即为数据的存活时间.
服务端根据当前时间, 每列每个版本的版本号, 表的TTL设置决定该列该版本是否过期, 过期的数据会自动清理.| Constructor and Description |
|---|
TimeseriesTableOptions()
构造TableOptions对象。
|
TimeseriesTableOptions(int timeToLive)
构造TableOptions对象。
|
| Modifier and Type | Method and Description |
|---|---|
int |
getTimeToLive()
获取TTL时间,单位为秒。
|
boolean |
hasSetTimeToLive()
查询是否调用
setTimeToLive(int)设置了TTL。 |
String |
jsonize() |
void |
jsonize(StringBuilder sb,
String newline) |
protected boolean |
jsonizeFields(StringBuilder sb,
boolean firstItem) |
void |
setTimeToLive(int timeToLive)
设置表数据的TTL时间,单位为秒。
|
String |
toString()
获取最大版本数。
|
public TimeseriesTableOptions()
public TimeseriesTableOptions(int timeToLive)
timeToLive - TTL时间public int getTimeToLive()
IllegalStateException - 若没有配置该参数public void setTimeToLive(int timeToLive)
timeToLive - TTL时间,单位为秒public boolean hasSetTimeToLive()
setTimeToLive(int)设置了TTL。public String toString()
toString in class ObjectIllegalStateException - 若没有配置该参数public String jsonize()
jsonize in interface Jsonizablepublic void jsonize(StringBuilder sb, String newline)
jsonize in interface Jsonizableprotected boolean jsonizeFields(StringBuilder sb, boolean firstItem)
Copyright © 2024. All Rights Reserved.