Class DefaultAttachmentIndexManager.TotalLengthPredicate

java.lang.Object
com.atlassian.jira.issue.managers.DefaultAttachmentIndexManager.TotalLengthPredicate
All Implemented Interfaces:
com.google.common.base.Predicate<JSONObject>, Predicate<JSONObject>
Enclosing class:
DefaultAttachmentIndexManager

@NotThreadSafe protected static class DefaultAttachmentIndexManager.TotalLengthPredicate extends Object implements com.google.common.base.Predicate<JSONObject>
JSONs are saved to the database by EntityProperty mechanism maximum length of whole index is EntityConstants.EXTREMELY_LONG_MAXIMUM_LENGTH. In very rare cases the index could contain less than 100 entries but still longer content than allowed.

This mutable predicate checks if current json can be added to the array.

  • Constructor Details

    • TotalLengthPredicate

      protected TotalLengthPredicate(long maxLength)
  • Method Details

    • apply

      public boolean apply(JSONObject json)
      Specified by:
      apply in interface com.google.common.base.Predicate<JSONObject>