Class Bucket.BucketPropertyPath

java.lang.Object
org.springframework.data.redis.core.convert.Bucket.BucketPropertyPath
Enclosing class:
Bucket

public static class Bucket.BucketPropertyPath extends Object
Value object representing a path within a Bucket. Paths can be either top-level (if the prefix is null or empty) or nested with a given prefix.
Since:
2.1
Author:
Mark Paluch
  • Method Details

    • from

      public static Bucket.BucketPropertyPath from(Bucket bucket)
      Creates a top-level Bucket.BucketPropertyPath given Bucket.
      Parameters:
      bucket - the bucket, must not be null.
      Returns:
      Bucket.BucketPropertyPath within the given Bucket.
    • from

      public static Bucket.BucketPropertyPath from(Bucket bucket, @Nullable String prefix)
      Creates a Bucket.BucketPropertyPath given Bucket and prefix. The resulting path is top-level if prefix is empty or nested, if prefix is not empty.
      Parameters:
      bucket - the bucket, must not be null.
      prefix - the prefix. Property path is top-level if prefix is null or empty.
      Returns:
      Bucket.BucketPropertyPath within the given Bucket using prefix.
    • get

      @Nullable public byte[] get(String key)
      Retrieve a value at key considering top-level/nesting.
      Parameters:
      key - must not be null or empty.
      Returns:
      the resulting value, may be null.
    • put

      public void put(String key, byte[] value)
      Write a value at key considering top-level/nesting.
      Parameters:
      key - must not be null or empty.
      value - the value.
    • getBucket

      public Bucket getBucket()
    • getPrefix

      @Nullable public String getPrefix()