org.hibernate.search.backend

## Class OptimizeLuceneWork

- java.lang.Object
- - org.hibernate.search.backend.LuceneWork
  - - org.hibernate.search.backend.OptimizeLuceneWork

-     public class OptimizeLuceneWork
      extends LuceneWork

  A unit of work triggering an optimize operation. This work does not propagate to a cluster: it should be filtered before being sent to the network.
  Author:
    Andrew Hahn, Emmanuel Bernard

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static OptimizeLuceneWork` | `INSTANCE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OptimizeLuceneWork(IndexedTypeIdentifier entityType)` Optimizes the index(es) of a specific entity

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<P,R> R` | `acceptIndexWorkVisitor(IndexWorkVisitor<P,R> visitor, P p)` Accepts the given visitor by dispatching the correct visit method for the specific `LuceneWork` sub-type.
    `String` | `toString()`

    - ### Methods inherited from class org.hibernate.search.backend.LuceneWork

      `getDocument, getEntityClass, getEntityType, getFieldToAnalyzerMap, getId, getIdInString, getTenantId`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### INSTANCE

          public static final OptimizeLuceneWork INSTANCE

  - ### Constructor Detail

    - #### OptimizeLuceneWork

          public OptimizeLuceneWork(IndexedTypeIdentifier entityType)

      Optimizes the index(es) of a specific entity
      Parameters:
        `entityType` - the entity type

  - ### Method Detail

    - #### acceptIndexWorkVisitor

          public <P,R> R acceptIndexWorkVisitor(IndexWorkVisitor<P,R> visitor,
                                                P p)

      Description copied from class: `LuceneWork`
      Accepts the given visitor by dispatching the correct visit method for the specific `LuceneWork` sub-type.
      Specified by:
        `acceptIndexWorkVisitor` in class `LuceneWork`
      Type Parameters:
        `P` - Context parameter type expected by a specific visitor
        `R` - Return type provided by a specific visitor
      Parameters:
        `visitor` - the visitor to accept
        `p` - a visitor-specific context parameter
      Returns:
        a visitor-specific return value or `null` if this visitor doesn't return a result

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved