Class ActionProfileInfo

java.lang.Object
io.github.zhh2001.jp4.pipeline.ActionProfileInfo

public final class ActionProfileInfo extends Object
Read-only metadata for one P4 action profile, derived from P4Info. Construction is internal to P4Info.fromBytes(byte[]) and friends; users obtain instances through P4Info.actionProfile(String).

An action profile is the indirect-action mechanism for tables: instead of binding an action inline on every entry, a table can reference one or more pre-configured action profile members (or groups of members when withSelector() is true). The tableIds() set lists which tables share this profile.

The selector_size_semantics field added in newer P4Info revisions is intentionally not exposed in v1.4; it can be added in a future v1.x release without affecting the existing surface.

Instances are constructed once during P4Info parsing and are immutable thereafter; safe to share across threads.

Since:
1.4.0
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    id()
    P4Runtime numeric id assigned by p4c.
    int
    Maximum weighted member entries per group; 0 when the profile does not use a selector.
    Fully-qualified action-profile name, e.g.
    long
    Maximum total member entries the profile can hold; if withSelector() is true the semantics depend on the target's selector_size_semantics.
    Immutable set of table ids that share this action profile.
     
    boolean
    True iff the action profile uses dynamic selection (action selector).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • name

      public String name()
      Fully-qualified action-profile name, e.g. "MyIngress.ecmp_profile".
    • id

      public int id()
      P4Runtime numeric id assigned by p4c.
    • withSelector

      public boolean withSelector()
      True iff the action profile uses dynamic selection (action selector).
    • size

      public long size()
      Maximum total member entries the profile can hold; if withSelector() is true the semantics depend on the target's selector_size_semantics.
    • maxGroupSize

      public int maxGroupSize()
      Maximum weighted member entries per group; 0 when the profile does not use a selector.
    • tableIds

      public Set<Integer> tableIds()
      Immutable set of table ids that share this action profile.
    • toString

      public String toString()
      Overrides:
      toString in class Object