Class PolicyKey


  • public class PolicyKey
    extends Object
    Policy key used by the store to track the operations ongoing on the devices. Policy is the high level intent expressed by the user that gets translated by the PolicyManager in modifications operated on the devices. The policy operations are more important than the policy itself without them the policy cannot be considered fulfilled.
    • Constructor Detail

      • PolicyKey

        public PolicyKey​(org.onosproject.net.DeviceId deviceId,
                         org.onosproject.segmentrouting.policy.api.PolicyId policyId)
        Constructs new policy key with given device id and policy id.
        Parameters:
        deviceId - device id
        policyId - policy id
    • Method Detail

      • deviceId

        public org.onosproject.net.DeviceId deviceId()
        Gets device id.
        Returns:
        device id of the policy key
      • policyId

        public org.onosproject.segmentrouting.policy.api.PolicyId policyId()
        Gets policy id.
        Returns:
        the id of the policy
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • fromString

        public static PolicyKey fromString​(String str)
        Parses from a string the police key.
        Parameters:
        str - the string to parse
        Returns:
        the policy key if present in the str, null otherwise