Class RetentionPolicies


  • public class RetentionPolicies
    extends java.lang.Object
    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 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 Detail

      • RetentionPolicies

        public RetentionPolicies()
      • RetentionPolicies

        public RetentionPolicies​(int retentionTimeInMinutes,
                                 int retentionSizeInMB)
    • Method Detail

      • getRetentionTimeInMinutes

        public int getRetentionTimeInMinutes()
      • getRetentionSizeInMB

        public long getRetentionSizeInMB()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object