org.hibernate.search.orm.jmx.impl

## Class IndexControl

- java.lang.Object
- - org.hibernate.search.orm.jmx.impl.IndexControl

- All Implemented Interfaces:
    IndexControlMBean

      public class IndexControl
      extends Object
      implements IndexControlMBean

  Implementation of the `IndexControlMBean` JMX attributes and operations.
  Author:
    Hardy Ferentschik

- - ### Field Summary

    - ### Fields inherited from interface org.hibernate.search.jmx.IndexControlMBean

      `INDEX_CTRL_MBEAN_OBJECT_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IndexControl(ExtendedSearchIntegrator extendedIntegrator, SessionFactory factory)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getBatchSize()`
    `int` | `getNumberOfFetchingThreads()`
    `int` | `getNumberOfObjectLoadingThreads()`
    `void` | `index(String entity)` Index the specified entity using the mass indexer.
    `void` | `optimize(String entity)` Optimizes the index for the specified entity.
    `void` | `purge(String entity)` Purge the index of the specified entity.
    `void` | `setBatchSize(int batchSize)` Sets the batch size for the mass indexer.
    `void` | `setNumberOfFetchingThreads(int numberOfThreads)`
    `void` | `setNumberOfObjectLoadingThreads(int numberOfThreads)`

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

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

- - ### Constructor Detail

    - #### IndexControl

          public IndexControl(ExtendedSearchIntegrator extendedIntegrator,
                              SessionFactory factory)

  - ### Method Detail

    - #### setBatchSize

          public void setBatchSize(int batchSize)

      Description copied from interface: `IndexControlMBean`
      Sets the batch size for the mass indexer.
      Specified by:
        `setBatchSize` in interface `IndexControlMBean`
      Parameters:
        `batchSize` - the new batch size

    - #### getBatchSize

          public int getBatchSize()

      Specified by:
        `getBatchSize` in interface `IndexControlMBean`
      Returns:
        the current batch size for (mass) indexing

    - #### setNumberOfObjectLoadingThreads

          public void setNumberOfObjectLoadingThreads(int numberOfThreads)

      Specified by:
        `setNumberOfObjectLoadingThreads` in interface `IndexControlMBean`
      Parameters:
        `numberOfThreads` - the number of threads used for object loading during mass indexing.

    - #### getNumberOfObjectLoadingThreads

          public int getNumberOfObjectLoadingThreads()

      Specified by:
        `getNumberOfObjectLoadingThreads` in interface `IndexControlMBean`
      Returns:
        the current number of threads during mass indexing

    - #### setNumberOfFetchingThreads

          public void setNumberOfFetchingThreads(int numberOfThreads)

      Specified by:
        `setNumberOfFetchingThreads` in interface `IndexControlMBean`
      Parameters:
        `numberOfThreads` - the number of threads used for collections fetching during mass indexing

    - #### getNumberOfFetchingThreads

          public int getNumberOfFetchingThreads()

      Specified by:
        `getNumberOfFetchingThreads` in interface `IndexControlMBean`
      Returns:
        the current number of threads used for collection fetching

    - #### index

          public void index(String entity)

      Description copied from interface: `IndexControlMBean`
      Index the specified entity using the mass indexer.

      Note:
      This method is only available if the Hibernate `SessionFactory` is available via JNDI.

      Specified by:
        `index` in interface `IndexControlMBean`
      Parameters:
        `entity` - The fqc of the entity to index

    - #### optimize

          public void optimize(String entity)

      Description copied from interface: `IndexControlMBean`
      Optimizes the index for the specified entity.

      Note:
      This method is only available if the Hibernate `SessionFactory` is available via JNDI.

      Specified by:
        `optimize` in interface `IndexControlMBean`
      Parameters:
        `entity` - The fqc of the entity to index

    - #### purge

          public void purge(String entity)

      Description copied from interface: `IndexControlMBean`
      Purge the index of the specified entity.

      Note:
      This method is only available if the Hibernate `SessionFactory` is available via JNDI.

      Specified by:
        `purge` in interface `IndexControlMBean`
      Parameters:
        `entity` - The fqc of the entity to index

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