Class RetentionPolicies
- java.lang.Object
-
- org.apache.pulsar.common.policies.data.RetentionPolicies
-
public class RetentionPolicies extends java.lang.ObjectDefinition 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 set, 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 Constructor Description RetentionPolicies()RetentionPolicies(int retentionTimeInMinutes, int retentionSizeInMB)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)longgetRetentionSizeInMB()intgetRetentionTimeInMinutes()inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getRetentionTimeInMinutes
public int getRetentionTimeInMinutes()
-
getRetentionSizeInMB
public long getRetentionSizeInMB()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-