Class KeyspaceConfiguration
java.lang.Object
org.springframework.data.redis.core.convert.KeyspaceConfiguration
KeyspaceConfiguration
allows programmatic setup of keyspaces and time to live options for certain types. This
is suitable for cases where there is no option to use the equivalent RedisHash
or TimeToLive
annotations.- Since:
- 1.7
- Author:
- Christoph Strobl
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addKeyspaceSettings
(KeyspaceConfiguration.KeyspaceSettings keyspaceSettings) AddKeyspaceConfiguration.KeyspaceSettings
for type.getKeyspaceSettings
(Class<?> type) Get theKeyspaceConfiguration.KeyspaceSettings
for given type.boolean
hasSettingsFor
(Class<?> type) Check if specificKeyspaceConfiguration.KeyspaceSettings
are available for given type.protected Iterable<KeyspaceConfiguration.KeyspaceSettings>
Customization hook.
-
Constructor Details
-
KeyspaceConfiguration
public KeyspaceConfiguration()
-
-
Method Details
-
hasSettingsFor
Check if specificKeyspaceConfiguration.KeyspaceSettings
are available for given type.- Parameters:
type
- must not be null.- Returns:
- true if settings exist.
-
getKeyspaceSettings
Get theKeyspaceConfiguration.KeyspaceSettings
for given type.- Parameters:
type
- must not be null- Returns:
- null if no settings configured.
-
initialConfiguration
Customization hook.- Returns:
- must not return null.
-
addKeyspaceSettings
AddKeyspaceConfiguration.KeyspaceSettings
for type.- Parameters:
keyspaceSettings
- must not be null.
-