public class IndexConfiguration extends Object implements ConfigurableIndexDefinitionProvider
IndexConfiguration
allows programmatic setup of indexes. This is suitable for cases where there is no option
to use the equivalent Indexed
annotation.Constructor and Description |
---|
IndexConfiguration()
Creates new empty
IndexConfiguration . |
Modifier and Type | Method and Description |
---|---|
void |
addIndexDefinition(IndexDefinition indexDefinition)
Add given
RedisIndexSetting . |
Set<IndexDefinition> |
getIndexDefinitionsFor(Serializable keyspace)
Get the list of
IndexDefinition for a given keyspace. |
Set<IndexDefinition> |
getIndexDefinitionsFor(Serializable keyspace,
String path)
Get the list of
IndexDefinition for a given keyspace and property path. |
boolean |
hasIndexFor(Serializable keyspace)
Gets all of the
RedisIndexSetting for a given keyspace. |
boolean |
hasIndexFor(Serializable keyspace,
String path)
Checks if an index is defined for a given keyspace and property path.
|
protected Iterable<? extends IndexDefinition> |
initialConfiguration()
Customization hook.
|
public IndexConfiguration()
IndexConfiguration
.public boolean hasIndexFor(Serializable keyspace)
IndexDefinitionProvider
RedisIndexSetting
for a given keyspace.hasIndexFor
in interface IndexDefinitionProvider
keyspace
- the keyspace to getpublic boolean hasIndexFor(Serializable keyspace, String path)
IndexDefinitionProvider
hasIndexFor
in interface IndexDefinitionProvider
public Set<IndexDefinition> getIndexDefinitionsFor(Serializable keyspace, String path)
IndexDefinitionProvider
IndexDefinition
for a given keyspace and property path.getIndexDefinitionsFor
in interface IndexDefinitionProvider
public Set<IndexDefinition> getIndexDefinitionsFor(Serializable keyspace)
IndexDefinitionProvider
IndexDefinition
for a given keyspace.getIndexDefinitionsFor
in interface IndexDefinitionProvider
public void addIndexDefinition(IndexDefinition indexDefinition)
IndexDefinitionRegistry
RedisIndexSetting
.addIndexDefinition
in interface IndexDefinitionRegistry
indexDefinition
- must not be null.protected Iterable<? extends IndexDefinition> initialConfiguration()
Copyright © 2011-2015–2017 Pivotal Software, Inc.. All rights reserved.