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
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddKeyspaceSettings(KeyspaceConfiguration.KeyspaceSettings keyspaceSettings) AddKeyspaceConfiguration.KeyspaceSettingsfor type.getKeyspaceSettings(Class<?> type) Get theKeyspaceConfiguration.KeyspaceSettingsfor given type.booleanhasSettingsFor(Class<?> type) Check if specificKeyspaceConfiguration.KeyspaceSettingsare available for given type.protected Iterable<KeyspaceConfiguration.KeyspaceSettings>Customization hook.
-
Constructor Details
-
KeyspaceConfiguration
public KeyspaceConfiguration()
-
-
Method Details
-
hasSettingsFor
Check if specificKeyspaceConfiguration.KeyspaceSettingsare available for given type.- Parameters:
type- must not be null.- Returns:
- true if settings exist.
-
getKeyspaceSettings
Get theKeyspaceConfiguration.KeyspaceSettingsfor given type.- Parameters:
type- must not be null- Returns:
- null if no settings configured.
-
initialConfiguration
Customization hook.- Returns:
- must not return null.
-
addKeyspaceSettings
AddKeyspaceConfiguration.KeyspaceSettingsfor type.- Parameters:
keyspaceSettings- must not be null.
-