Annotation Interface PartitionBy


@Target({FIELD,METHOD}) @Retention(RUNTIME) public @interface PartitionBy
Specifies a partition key for fields or methods. This annotation is used to define the partitioning value that groups or categorizes data elements.

Apply this annotation to fields or methods in classes where partitioning logic is required. The value() method defines the partition key as an integer.

Retention: RUNTIME

This annotation is retained at runtime to allow runtime reflection.

Target: FIELD, METHOD

This annotation can be applied to fields or methods.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
    The partition key value for the annotated field or method.
  • Element Details

    • value

      int value
      The partition key value for the annotated field or method.
      Returns:
      an integer representing the partition key