I am trying to set timeout for 30 days (i.e. 2592000 seconds) for entries in a region.
In, gfsh I was able to do create region --name=employee --type=REPLICATE --enable-statistics --entry-time-to-live-expiration=2592000. To confirm, do we use @TimeToLiveExpiration for entry not for region. I do not want the region to be deleted. If this is for entry then curious how can we set for region? Thanks.
@ReplicatedRegion(name = "employee")
@EnableStatistics
@TimeToLiveExpiration(timeout = "2592000", action = "DESTROY") // is this for region or entry ??
@Data
public class Employee {
private String id;
}
Yes, both SDG's entity-level Expiration-based annotations,
@TimeToLiveExpirationand@IdleTimeoutExpirationconfigureRegion"entry" level expiration polices.Technically, this is implemented as an
CustomExpiryobject (Javadoc) registered on theRegion(e.g. "employees"). These annotations most definitely do NOT expire, or delete/remove theRegion.More information on configuring Apache Geode (GemFire) Expiration (policies) using SDG can be found here and here.