Interface PartitionAttributes


@Deprecated public interface PartitionAttributes
Deprecated.
We are unaware of anyone using "partition" feature and plan to remove it in future releases. If you depend on it, consider using ClientGroup as an alternative or reach out to the maintainers describing the use-case.
Provide a way to describe a partition using a collection of of attributes. Typically only a single type of any particular PartitionAttributes.Key exists in each PartitionAttributes. For example:
 { [Key(shard) = "shard X"], [Key(data center) = "data center X"], [Key(is main) = "false/true"] }
 
This construct allows for the attributes to partially specify a partition and preform "wild card" type matching.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    Deprecated.
    A key identifies a specific object in a PartitionAttributes.
  • Method Summary

    Modifier and Type
    Method
    Description
    default <T> boolean
    Deprecated.
    Determine if there is a value associated with key.
    void
    Deprecated.
    Iterate over the key/value pairs in this collection.
    <T> T
    Deprecated.
    Get the value associated with key.
    boolean
    Deprecated.
    Determine if there are no key/value pairs in this collection.
    int
    Deprecated.
    Determine how many key/value pairs are contained in this collection.
  • Method Details

    • get

      @Nullable <T> T get(PartitionAttributes.Key<T> key)
      Deprecated.
      Get the value associated with key.
      Type Parameters:
      T - The expected value type associated with key.
      Parameters:
      key - The key to lookup.
      Returns:
      the value associated with key, or null.
    • contains

      default <T> boolean contains(PartitionAttributes.Key<T> key)
      Deprecated.
      Determine if there is a value associated with key.
      Type Parameters:
      T - The expected value type associated with key.
      Parameters:
      key - The key to check if there is any associated value for.
      Returns:
      true if there is a value associated with key.
    • forEach

      void forEach(BiConsumer<PartitionAttributes.Key,Object> action)
      Deprecated.
      Iterate over the key/value pairs in this collection.
      Parameters:
      action - Invoked for each key/value pair in this collection.
    • size

      int size()
      Deprecated.
      Determine how many key/value pairs are contained in this collection.
      Returns:
      the number of key/value pairs are contained in this collection.
    • isEmpty

      boolean isEmpty()
      Deprecated.
      Determine if there are no key/value pairs in this collection.
      Returns:
      true if there are no key/value pairs in this collection.