Class FeaturePolicyEnforcer


  • public class FeaturePolicyEnforcer
    extends Object
    This class enforces a policy on a feature that defines resource limitations (CPU, RAM, flash, network bandwidth), priority and criticality.
    • Constructor Detail

      • FeaturePolicyEnforcer

        public FeaturePolicyEnforcer()
        Initializes a policy enforcer.
    • Method Detail

      • applyPolicy

        public void applyPolicy​(Feature app)
                         throws JSONException,
                                IOException
        Applies a policy to the given feature.
        Parameters:
        app - the feature to which the policy will be applied.
        Throws:
        JSONException - if file parsing fails.
        IOException - if I/O errors occur.
      • applyThreadPriority

        public void applyThreadPriority​(Feature app)
        Sets priority to the threads owned by the given feature.
        Parameters:
        app - the feature to which the priority will be applied.