Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

De/un-deprecate IndexType ENUM

To be Reviewed By: John Blum, Jason HuynhJanuary 10, 2019

Authors: Joris Melchior

Status: Draft  Draft | Discussion | Active | Dropped | Superseded

Superseded by: N/A

...

The org.apache.geode.cache.query.IndexType ENUM has been deprecated for some time and we currently have no alternative to replace it with. The deprecation method annotation refers to the org.apache.geode.cache.query.QueryService interface but upon inspection it is clear that while this interface tries to hide the use of the ENUM it continues to use it under the covers.

...

We would like to be able to use a non-deprecated indicator of the type of index that is in use on a given Region.

On Some of the method on our org.apache.geode.cache.query.QueryService interface some of the method provided for creating/defining new indexes could be more descriptive to better express intention.

Anti-Goals

  • We are not trying to introduce new types of indexes
  • We are not trying to make HASH a supported index type again

...

  1. Remove the "Deprecated" indicator off the org.apache.geode.cache.query.IndexType ENUM.
  2. Maintain the "Deprecated" indicator on the org.apache.geode.cache.query.IndexType.HASH item
  3. Create new methods for creation of IndexType.FUNCTIONAL indexes on the org.apache.geode.cache.query.QueryService interface
    1. createFunctionalIndex
    2. defineFunctionalIndex
  4. Deprecate the less descriptive methods for the creation of IndexType.FUNCTIONAL indexes on the org.apache.geode.cache.query.QueryService interface
    1. createIndex
    2. defineIndex
    3. provide clear deprecation messages indicating the replacement code for the deprecated codemethods
  5. Propagate implementation of new interface methods on org.apache.geode.cache.query.QueryService interface to known implementations
  6. Refactor code to use new implementations in all code under our control

...