Class Bucket
java.lang.Object
org.springframework.data.redis.core.convert.Bucket
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasMap()Key/value pairs contained in theBucket.entrySet()A set view of the mappings contained in this bucket.Extracts a bucket containing key/value pairs with theprefix.extractAllKeysFor(String path) Get all the keys matching a given path.byte @Nullable []Get value assigned with path.getPath()Get theBucket.BucketPropertyPathleading to the currentBucket.getPropertyPath(String property) Get theBucket.BucketPropertyPathfor a given property within the currentBucket.booleanReturn whetherpathis associated with a non-null value.booleanisEmpty()keySet()static BucketnewBucketFromRawMap(Map<byte[], byte[]> source) Creates a new Bucket from a given raw map.static BucketnewBucketFromStringMap(Map<String, String> source) Creates a new Bucket from a givenStringmap.voidAddStringrepresentation of property dot path with given value.Map<byte[], byte[]> rawMap()Get keys and values in binary format.voidRemove the property at property dotpath.intsize()toString()Collection<byte[]> values()
-
Field Details
-
CHARSET
-
-
Constructor Details
-
Bucket
public Bucket()Creates a new empty bucket.
-
-
Method Details
-
put
AddStringrepresentation of property dot path with given value.- Parameters:
path- must not be null orString.isEmpty().value- can be null.
-
remove
Remove the property at property dotpath.- Parameters:
path- must not be null orString.isEmpty().
-
get
Get value assigned with path.- Parameters:
path- must not be null orString.isEmpty().- Returns:
- null if not set.
-
hasValue
Return whetherpathis associated with a non-null value.- Parameters:
path- must not be null orString.isEmpty().- Returns:
- true if the
pathis associated with a non-null value. - Since:
- 2.5
-
entrySet
-
isEmpty
public boolean isEmpty()- Returns:
- true when no data present in
Bucket.
-
size
public int size()- Returns:
- the number of key-value mappings of the
Bucket.
-
values
- Returns:
- never null.
-
keySet
-
asMap
-
extract
-
extractAllKeysFor
-
rawMap
-
getPath
Get theBucket.BucketPropertyPathleading to the currentBucket.- Returns:
- new instance of
Bucket.BucketPropertyPath. - Since:
- 2.1
-
getPropertyPath
Get theBucket.BucketPropertyPathfor a given property within the currentBucket.- Parameters:
property- the property to look up.- Returns:
- new instance of
Bucket.BucketPropertyPath. - Since:
- 2.1
-
newBucketFromRawMap
-
newBucketFromStringMap
-
toString
-