Class RetentionPolicies
java.lang.Object
org.apache.pulsar.common.policies.data.RetentionPolicies
- All Implemented Interfaces:
Cloneable
Definition of the retention policy.
When you set a retention policy you must set **both** a *size limit* and a *time limit*. In the case where you don't want to limit by either time or size, the value must be set to `-1`. Retention policy will be effectively disabled and it won't prevent the deletion of acknowledged messages when either size or time limit is set to `0`. Infinite retention can be achieved by setting both time and size limits to `-1`.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected RetentionPolicies
clone()
boolean
long
int
int
hashCode()
toString()
-
Constructor Details
-
RetentionPolicies
public RetentionPolicies() -
RetentionPolicies
public RetentionPolicies(int retentionTimeInMinutes, long retentionSizeInMB)
-
-
Method Details
-
getRetentionTimeInMinutes
public int getRetentionTimeInMinutes() -
getRetentionSizeInMB
public long getRetentionSizeInMB() -
clone
-
equals
-
hashCode
public int hashCode() -
toString
-