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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addIndexDefinition
(IndexDefinition indexDefinition) Add givenIndexDefinition
.getIndexDefinitionsFor
(Serializable keyspace) Get the list ofIndexDefinition
for a givenkeyspace
.getIndexDefinitionsFor
(Serializable keyspace, String path) boolean
hasIndexFor
(Serializable keyspace) Checks if an index is defined for a givenkeyspace
.boolean
hasIndexFor
(Serializable keyspace, String path) Checks if an index is defined for a givenkeyspace
and propertypath
.protected Iterable<? extends IndexDefinition>
Customization hook.
-
Constructor Details
-
IndexConfiguration
public IndexConfiguration()Creates new emptyIndexConfiguration
.
-
-
Method Details
-
hasIndexFor
Description copied from interface:IndexDefinitionProvider
Checks if an index is defined for a givenkeyspace
.- Specified by:
hasIndexFor
in interfaceIndexDefinitionProvider
- Parameters:
keyspace
- the keyspace to get- Returns:
- never null
-
hasIndexFor
Description copied from interface:IndexDefinitionProvider
Checks if an index is defined for a givenkeyspace
and propertypath
.- Specified by:
hasIndexFor
in interfaceIndexDefinitionProvider
- Returns:
- true if index is defined.
-
getIndexDefinitionsFor
Description copied from interface:IndexDefinitionProvider
- Specified by:
getIndexDefinitionsFor
in interfaceIndexDefinitionProvider
- Returns:
- never null.
-
getIndexDefinitionsFor
Description copied from interface:IndexDefinitionProvider
Get the list ofIndexDefinition
for a givenkeyspace
.- Specified by:
getIndexDefinitionsFor
in interfaceIndexDefinitionProvider
- Returns:
- never null.
-
addIndexDefinition
Description copied from interface:IndexDefinitionRegistry
Add givenIndexDefinition
.- Specified by:
addIndexDefinition
in interfaceIndexDefinitionRegistry
- Parameters:
indexDefinition
- must not be null.
-
initialConfiguration
Customization hook.- Returns:
- must not return null.
-