Class IndexConfiguration
java.lang.Object
org.springframework.data.redis.core.index.IndexConfiguration
- All Implemented Interfaces:
ConfigurableIndexDefinitionProvider,IndexDefinitionProvider,IndexDefinitionRegistry
IndexConfiguration allows programmatic setup of indexes. This is suitable for cases where there is no option
to use the equivalent Indexed annotation.- Since:
- 1.7
- Author:
- Christoph Strobl, Rob Winch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIndexDefinition(IndexDefinition indexDefinition) Add givenIndexDefinition.getIndexDefinitionsFor(Serializable keyspace) Get the list ofIndexDefinitionfor a givenkeyspace.getIndexDefinitionsFor(Serializable keyspace, String path) booleanhasIndexFor(Serializable keyspace) Checks if an index is defined for a givenkeyspace.booleanhasIndexFor(Serializable keyspace, String path) Checks if an index is defined for a givenkeyspaceand propertypath.protected Iterable<? extends IndexDefinition>Customization hook.
-
Constructor Details
-
IndexConfiguration
public IndexConfiguration()Creates new emptyIndexConfiguration.
-
-
Method Details
-
hasIndexFor
Description copied from interface:IndexDefinitionProviderChecks if an index is defined for a givenkeyspace.- Specified by:
hasIndexForin interfaceIndexDefinitionProvider- Parameters:
keyspace- the keyspace to get- Returns:
- never null
-
hasIndexFor
Description copied from interface:IndexDefinitionProviderChecks if an index is defined for a givenkeyspaceand propertypath.- Specified by:
hasIndexForin interfaceIndexDefinitionProvider- Returns:
- true if index is defined.
-
getIndexDefinitionsFor
Description copied from interface:IndexDefinitionProvider- Specified by:
getIndexDefinitionsForin interfaceIndexDefinitionProvider- Returns:
- never null.
-
getIndexDefinitionsFor
Description copied from interface:IndexDefinitionProviderGet the list ofIndexDefinitionfor a givenkeyspace.- Specified by:
getIndexDefinitionsForin interfaceIndexDefinitionProvider- Returns:
- never null.
-
addIndexDefinition
Description copied from interface:IndexDefinitionRegistryAdd givenIndexDefinition.- Specified by:
addIndexDefinitionin interfaceIndexDefinitionRegistry- Parameters:
indexDefinition- must not be null.
-
initialConfiguration
Customization hook.- Returns:
- must not return null.
-