org.hibernate.search.backend

## Class FlushLuceneWork

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

-     public class FlushLuceneWork
      extends LuceneWork

  Used to flush and commit asynchronous and other pending operations on the Indexes. Generally not needed, this is mainly used at the end of mass indexing operations.
  Since:
    4.1
  Author:
    Sanne Grinovero (C) 2012 Red Hat Inc.

- - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FlushLuceneWork(String tenantId, IndexedTypeIdentifier typeIdentifier)` Flushes all index operations for 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 FlushLuceneWork INSTANCE

  - ### Constructor Detail

    - #### FlushLuceneWork

          public FlushLuceneWork(String tenantId,
                                 IndexedTypeIdentifier typeIdentifier)

      Flushes all index operations for a specific entity.
      Parameters:
        `tenantId` - the tenant identifier. It might be null
        `typeIdentifier` - the entity type for which to flush the index

  - ### 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