@@ -0,0 +1,2140 @@
+package org.drools.conf;%0A%0A/**%0A * A class PermGen threshold configuration.%0A */%0Apublic class PermGenThresholdOption implements SingleValueKnowledgeBaseOption %7B%0A%0A    private static final long serialVersionUID = 510l;%0A%0A    /**%0A     * The property name for the default DIALECT%0A     */%0A    public static final String PROPERTY_NAME = %22drools.permgenThreshold%22;%0A%0A    /**%0A     * The defualt value for this option%0A     */%0A    public static final int DEFAULT_VALUE = 90;%0A%0A    /**%0A     * The threshold of PermGen usage (in percentage) above which the%0A     * engine stops JITting constraints and let them run in interpreted mode%0A     */%0A    private final int threshold;%0A%0A    /**%0A     * Private constructor to enforce the use of the factory method%0A     * @param threshold%0A     */%0A    private PermGenThresholdOption( int threshold ) %7B%0A        this.threshold = threshold;%0A    %7D%0A%0A    /**%0A     * This is a factory method for this PermGen Threshold configuration.%0A     * The factory method is a best practice for the case where the%0A     * actual object construction is changed in the future.%0A     *%0A     * @param threshold the threshold value for the PermGen option%0A     *%0A     * @return the actual type safe PermGen threshold configuration.%0A     */%0A    public static PermGenThresholdOption get( int threshold ) %7B%0A        return new PermGenThresholdOption( threshold );%0A    %7D%0A%0A    /**%0A     * %7B@inheritDoc%7D%0A     */%0A    public String getPropertyName() %7B%0A        return PROPERTY_NAME;%0A    %7D%0A%0A    /**%0A     * Returns the threshold value for PermGen%0A     *%0A     * @return%0A     */%0A    public int getThreshold() %7B%0A        return threshold;%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        final int prime = 31;%0A        int result = 1;%0A        result = prime * result + threshold;%0A        return result;%0A    %7D%0A%0A    @Override%0A    public boolean equals(Object obj) %7B%0A        if ( this == obj ) return true;%0A        if ( obj == null ) return false;%0A        if ( getClass() != obj.getClass() ) return false;%0A        PermGenThresholdOption other = (PermGenThresholdOption) obj;%0A        if ( threshold != other.threshold ) return false;%0A        return true;%0A    %7D%0A%7D%0A

add an option defining the percentage of PermGen size that can be used before stopping jitting constraints