Class AttachmentOnlyReIndexSupport

java.lang.Object
com.atlassian.confluence.search.AttachmentOnlyReIndexSupport
All Implemented Interfaces:
ReIndexSupport<Attachment>

public class AttachmentOnlyReIndexSupport extends Object implements ReIndexSupport<Attachment>
Reindex support for attachments only.
Since:
10.1
  • Constructor Details

    • AttachmentOnlyReIndexSupport

      public AttachmentOnlyReIndexSupport()
  • Method Details

    • getEntityClass

      public Class<Attachment> getEntityClass()
      Description copied from interface: ReIndexSupport
      Get the entity class for this reindex option. Only required if using default implementations of getClassFilter() or getHandles().
      Specified by:
      getEntityClass in interface ReIndexSupport<Attachment>
      Returns:
      the entity class
    • getDeleteQuery

      public SearchQuery getDeleteQuery()
      Description copied from interface: ReIndexSupport
      Get the search query for deleting documents during reindexing.
      Specified by:
      getDeleteQuery in interface ReIndexSupport<Attachment>
      Returns:
      the delete query
    • getDeleteQuery

      public SearchQuery getDeleteQuery(Optional<String> spaceKey)
      Description copied from interface: ReIndexSupport
      Get the search query for deleting documents during reindexing within a specific space.
      Specified by:
      getDeleteQuery in interface ReIndexSupport<Attachment>
      Parameters:
      spaceKey - the space key to limit the deletion to
      Returns:
      the delete query
    • getThreadCount

      public Integer getThreadCount(JvmSystemResources jvmRuntime)
      Determine how many threads should be used for attachment reindexing. Unlike CONTENT_ONLY, where the number of threads is determined solely by the number of CPUs, attachment reindexing can be memory intensive. To reduce the risk of memory starvation, we therefore also take the amount of available free memory into account. We require that a certain amount of free memory is available per thread. This per-thread amount is very much an educated guess at this point.
      Specified by:
      getThreadCount in interface ReIndexSupport<Attachment>
      Parameters:
      jvmRuntime - the JVM system resources
      Returns:
      the thread count
    • toString

      public String toString()
      Overrides:
      toString in class Object