Package com.oracle.coherence.repository
Annotation Interface Indexed
An annotation that should be applied to accessor methods for the
properties that need to be indexed.
Indexing significantly improves query and aggregation performance by both
avoiding deserialization of stored entities and optimizing query execution,
so in general, any property that is used for querying should be indexed.
- Since:
- 21.06
- Author:
- Aleks Seovic 2021.02.12
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<? extends Comparator> An optionalComparatorclass to use for ordering.booleanDetermines whether the index should be ordered or not (default).
-
Element Details
-
ordered
boolean orderedDetermines whether the index should be ordered or not (default). Ordered indices are more effective with range queries, such asgreater than,less thanandbetween, and should be used for attributes that are primarily queried using those types of filters. When that's not the case, the unordered filters (default) are less expensive to create and maintain, and should be preferred.- Returns:
- whether the index should be ordered
- Default:
false
-
comparator
Class<? extends Comparator> comparatorAn optionalComparatorclass to use for ordering. Only applicable whenordered()is set totrue. Must have a default constructor. If not specified, the natural ordering will be used, assuming that the property marked with this annotation returns a type that implementsComparableinterface.- Returns:
- the class of the
Comparatorto use for ordering
- Default:
java.util.Comparator.class
-