类 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`.
-
-
构造器概要
构造器 构造器 说明 RetentionPolicies()RetentionPolicies(int retentionTimeInMinutes, int retentionSizeInMB)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanequals(java.lang.Object o)longgetRetentionSizeInMB()intgetRetentionTimeInMinutes()inthashCode()java.lang.StringtoString()
-
-
-
方法详细资料
-
getRetentionTimeInMinutes
public int getRetentionTimeInMinutes()
-
getRetentionSizeInMB
public long getRetentionSizeInMB()
-
equals
public boolean equals(java.lang.Object o)
- 覆盖:
equals在类中java.lang.Object
-
hashCode
public int hashCode()
- 覆盖:
hashCode在类中java.lang.Object
-
toString
public java.lang.String toString()
- 覆盖:
toString在类中java.lang.Object
-
-