LuceneTestUtilities (Apache Geode 1.7.0)
Date: 2018-09-27

org.apache.geode.cache.lucene.test

## Class LuceneTestUtilities

- java.lang.Object
- - org.apache.geode.cache.lucene.test.LuceneTestUtilities

-     public class LuceneTestUtilities
      extends java.lang.Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `LuceneTestUtilities.FloatRangeQueryProvider`
    `static class` | `LuceneTestUtilities.IntRangeQueryProvider`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_ANALYZERS`
    `static java.lang.String` | `CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_ANALYZERS_1`
    `static java.lang.String` | `CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_ANALYZERS_2`
    `static java.lang.String` | `CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_ANALYZERS_3`
    `static java.lang.String` | `CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_FIELDS`
    `static java.lang.String` | `CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_FIELDS_2`
    `static java.lang.String` | `CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_INDEXES_1`
    `static java.lang.String` | `CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_INDEXES_2`
    `static java.lang.String` | `CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_INDEXES_3`
    `static java.lang.String` | `CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_NAMES`
    `static java.lang.String` | `CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_SERIALIZER`
    `static java.lang.String` | `DEFAULT_FIELD`
    `static java.lang.String` | `INDEX_NAME`
    `static java.lang.String` | `Quarter1`
    `static java.lang.String` | `Quarter2`
    `static java.lang.String` | `Quarter3`
    `static java.lang.String` | `Quarter4`
    `static java.lang.String` | `REGION_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LuceneTestUtilities()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Region` | `createFixedPartitionedRegion(Cache cache, java.lang.String regionName, java.util.List<FixedPartitionAttributes> fpaList, int localMaxMemory)`
    `static void` | `createIndex(Cache cache, java.lang.String... fieldNames)`
    `static AsyncEventQueue` | `getIndexQueue(Cache cache)`
    `static void` | `pauseSender(Cache cache)`
    `static void` | `resumeSender(Cache cache)`
    `static void` | `verifyIndexFinishFlushing(Cache cache, java.lang.String indexName, java.lang.String regionName)`
    `static void` | `verifyInternalRegions(LuceneService luceneService, Cache cache, java.util.function.Consumer<org.apache.geode.internal.cache.LocalRegion> verify)`
    `static <K> void` | `verifyQueryKeyAndValues(LuceneQuery<K,java.lang.Object> query, java.util.HashMap expectedResults)` Verify that a query returns the expected map of key-value.
    `static <K> void` | `verifyQueryKeys(LuceneQuery<K,java.lang.Object> query, K... expectedKeys)` Verify that a query returns the expected list of keys.
    `static void` | `verifyResultOrder(java.util.Collection<org.apache.geode.cache.lucene.internal.distributed.EntryScore<java.lang.String>> list, org.apache.geode.cache.lucene.internal.distributed.EntryScore<java.lang.String>... expectedEntries)`

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

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

- - ### Field Detail

    - #### INDEX_NAME

          public static final java.lang.String INDEX_NAME

      See Also:
        Constant Field Values

    - #### REGION_NAME

          public static final java.lang.String REGION_NAME

      See Also:
        Constant Field Values

    - #### DEFAULT_FIELD

          public static final java.lang.String DEFAULT_FIELD

      See Also:
        Constant Field Values

    - #### CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_FIELDS

          public static final java.lang.String CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_FIELDS

      See Also:
        Constant Field Values

    - #### CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_FIELDS_2

          public static final java.lang.String CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_FIELDS_2

      See Also:
        Constant Field Values

    - #### CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_ANALYZERS

          public static final java.lang.String CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_ANALYZERS

      See Also:
        Constant Field Values

    - #### CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_ANALYZERS_1

          public static final java.lang.String CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_ANALYZERS_1

      See Also:
        Constant Field Values

    - #### CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_ANALYZERS_2

          public static final java.lang.String CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_ANALYZERS_2

      See Also:
        Constant Field Values

    - #### CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_ANALYZERS_3

          public static final java.lang.String CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_ANALYZERS_3

      See Also:
        Constant Field Values

    - #### CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_NAMES

          public static final java.lang.String CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_NAMES

      See Also:
        Constant Field Values

    - #### CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_INDEXES_1

          public static final java.lang.String CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_INDEXES_1

      See Also:
        Constant Field Values

    - #### CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_INDEXES_2

          public static final java.lang.String CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_INDEXES_2

      See Also:
        Constant Field Values

    - #### CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_INDEXES_3

          public static final java.lang.String CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_INDEXES_3

      See Also:
        Constant Field Values

    - #### CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_SERIALIZER

          public static final java.lang.String CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_SERIALIZER

      See Also:
        Constant Field Values

    - #### Quarter1

          public static java.lang.String Quarter1

    - #### Quarter2

          public static java.lang.String Quarter2

    - #### Quarter3

          public static java.lang.String Quarter3

    - #### Quarter4

          public static java.lang.String Quarter4

  - ### Constructor Detail

    - #### LuceneTestUtilities

          public LuceneTestUtilities()

  - ### Method Detail

    - #### verifyResultOrder

          public static void verifyResultOrder(java.util.Collection<org.apache.geode.cache.lucene.internal.distributed.EntryScore<java.lang.String>> list,
                                               org.apache.geode.cache.lucene.internal.distributed.EntryScore<java.lang.String>... expectedEntries)

    - #### createFixedPartitionedRegion

          public static Region createFixedPartitionedRegion(Cache cache,
                                                            java.lang.String regionName,
                                                            java.util.List<FixedPartitionAttributes> fpaList,
                                                            int localMaxMemory)

    - #### verifyInternalRegions

          public static void verifyInternalRegions(LuceneService luceneService,
                                                   Cache cache,
                                                   java.util.function.Consumer<org.apache.geode.internal.cache.LocalRegion> verify)

    - #### getIndexQueue

          public static AsyncEventQueue getIndexQueue(Cache cache)

    - #### createIndex

          public static void createIndex(Cache cache,
                                         java.lang.String... fieldNames)

    - #### verifyIndexFinishFlushing

          public static void verifyIndexFinishFlushing(Cache cache,
                                                       java.lang.String indexName,
                                                       java.lang.String regionName)
                                                throws java.lang.InterruptedException

      Throws:
        `java.lang.InterruptedException`

    - #### verifyQueryKeys

          public static <K> void verifyQueryKeys(LuceneQuery<K,java.lang.Object> query,
                                                 K... expectedKeys)
                                          throws LuceneQueryException

      Verify that a query returns the expected list of keys. Ordering is ignored.
      Throws:
        `LuceneQueryException`

    - #### verifyQueryKeyAndValues

          public static <K> void verifyQueryKeyAndValues(LuceneQuery<K,java.lang.Object> query,
                                                         java.util.HashMap expectedResults)
                                                  throws LuceneQueryException

      Verify that a query returns the expected map of key-value. Ordering is ignored.
      Throws:
        `LuceneQueryException`

    - #### pauseSender

          public static void pauseSender(Cache cache)

    - #### resumeSender

          public static void resumeSender(Cache cache)