public static interface SyncMap.Item.Metadata
| Modifier and Type | Method and Description |
|---|---|
static SyncMap.Item.Metadata |
withTtl(int duration)
Construct metadata with specified time to live in seconds.
|
static SyncMap.Item.Metadata withTtl(int duration)
TTL specifies the minimum time the SyncMap Item will live, sometime soon after this time the object will be deleted.
If time to live is not specified, object lives infinitely long.
TTL could be used in order to auto-recycle old unused objects, but it is not recommended to build some app logic like timers using ttl.
duration - Time to live in seconds from now.