Class Limit

  • All Implemented Interfaces:
    Serializable, Comparable<Limit>
    Direct Known Subclasses:
    NodeCountLimit, PageCountLimit, StreamCountLimit, StreamSizeLimit, TimeLimit

    public abstract class Limit
    extends Object
    implements Serializable, Comparable<Limit>
    A Limit represents a configuration element used to restrict the way in which a Job (or rather its Nodes and Workers) is allowed to run. Limits can be applied to Jobs in order to constrain their resource usage and apply restrictions to input, output and intermediate data. Limits can be applied to Jobs and Nodes.

    The precedence of Limits depends on their Limit.WhenExceedAction:

    • ABORT Limits applied to a Node always take precedence over the Job's ones, even if they are less restrictive, i.e. the Job's ones have a lower bound.
    • WARN Limits are merged together so that both—Job and Node limits—are applied to a particular node.

    Limits are generally used to ensure the reliable operation of a jadice server installation. However, they are particularly useful when processing data from untrusted, heterogeneous sources. This applies to cases of malicious data where limits help to fend-off denial-of-service attacks, but also to honest, but still corrupt data.

    Caveat: Limits are only useful and effective for areas over which jadice server has full control. As soon as external or native code is involved in a processing pipeline, the protection becomes rather limited if not ineffective. Therefore proper security precautions are required for any external code used by jadice server.

    See Also:
    Serialized Form
    • Constructor Detail

      • Limit

        public Limit()
    • Method Detail

      • setExceedAction

        public void setExceedAction​(Limit.WhenExceedAction exceedAction)
        Set the action to take when the limit has been exceeded.
        Parameters:
        exceedAction - The action to take when the limit was exceeded
      • doesExceed

        public abstract boolean doesExceed​(long count)
      • equals

        public abstract boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • hashCode

        public abstract int hashCode()
        Overrides:
        hashCode in class Object