Class RedisData
java.lang.Object
org.springframework.data.redis.core.convert.RedisData
Data object holding
Bucket representing the domain object to be stored in a Redis hash. Index information
points to additional structures holding the objects is for searching.- Since:
- 1.7
- Author:
- Christoph Strobl, Mark Paluch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIndexedData(Collection<IndexedData> indexes) voidaddIndexedData(IndexedData index) getId()Get the time before expiration in seconds.voidSet the id to be used as part of the key.voidsetKeyspace(String keyspace) voidsetTimeToLive(Long timeToLive) Set the time before expiration inTimeUnit.SECONDS.voidsetTimeToLive(Long timeToLive, TimeUnit timeUnit) Set the time before expiration converting the given arguments toTimeUnit.SECONDS.toString()
-
Constructor Details
-
RedisData
public RedisData() -
RedisData
- Parameters:
raw- should not be null.
-
RedisData
- Parameters:
bucket- must not be null.
-
-
Method Details
-
setId
Set the id to be used as part of the key.- Parameters:
id-
-
getId
- Returns:
-
getTimeToLive
Get the time before expiration in seconds.- Returns:
- null if not set.
-
addIndexedData
- Parameters:
index- must not be null.
-
addIndexedData
- Parameters:
indexes- must not be null.
-
getIndexedData
- Returns:
- never null.
-
getKeyspace
- Returns:
-
setKeyspace
- Parameters:
keyspace-
-
getBucket
- Returns:
-
setTimeToLive
Set the time before expiration inTimeUnit.SECONDS.- Parameters:
timeToLive- can be null.
-
setTimeToLive
Set the time before expiration converting the given arguments toTimeUnit.SECONDS.- Parameters:
timeToLive- must not be nulltimeUnit- must not be null
-
toString
-