@Test public void testPermGenThresholdConfiguration() { Assume.assumeTrue("JVM with perm gen", MemoryUtil.hasPermGen()); // setting the option using the type safe method config.setOption( PermGenThresholdOption.get(85) ); // checking the type safe getOption() method assertEquals( PermGenThresholdOption.get(85), config.getOption( PermGenThresholdOption.class ) ); // checking the string based getProperty() method assertEquals( "85", config.getProperty( PermGenThresholdOption.PROPERTY_NAME ) ); // setting the options using the string based setProperty() method config.setProperty( PermGenThresholdOption.PROPERTY_NAME, "87" ); // checking the type safe getOption() method assertEquals( PermGenThresholdOption.get(87), config.getOption( PermGenThresholdOption.class ) ); // checking the string based getProperty() method assertEquals( "87", config.getProperty( PermGenThresholdOption.PROPERTY_NAME ) ); }
/** * This is a factory method for this PermGen Threshold configuration. * The factory method is a best practice for the case where the * actual object construction is changed in the future. * * @param threshold the threshold value for the PermGen option * * @return the actual type safe PermGen threshold configuration. */ public static PermGenThresholdOption get( int threshold ) { return new PermGenThresholdOption( threshold ); }
return org.drools.conf.PermGenThresholdOption.get(kieOption.getThreshold());
return PermGenThresholdOption.get(legacyOption.getThreshold());