public LeastFrequentlyUsedCache( final int cacheSize ) { // having at least 3 entries saves me a lot of coding and thus gives more performance .. this.map = new LFUMap<FontKey, FontMetrics>( cacheSize ); }
public TextCache( final int maxEntries ) { cache = new LFUMap<InstanceID, InternalResult>( maxEntries ); }
public RTFImageCache( final ResourceManager resourceManager ) { if ( resourceManager == null ) { throw new NullPointerException(); } this.resourceManager = resourceManager; this.cachedImages = new LFUMap( 100 ); }
public CachingExcelColorSupport( final ExcelColorProducer base ) { if ( base == null ) { throw new NullPointerException(); } this.base = base; this.colorCache = new LFUMap<Integer, Short>( 5000 ); }
public LibLoaderResourceBundleFactory() { this.failedLoads = new HashSet<String>(); this.successfulLoads = new LFUMap<String, LibLoaderResourceBundle>( 30 ); }
private void readObject( final ObjectInputStream stream ) throws IOException, ClassNotFoundException { stream.defaultReadObject(); failedLoads = new HashSet<String>(); successfulLoads = new LFUMap<String, LibLoaderResourceBundle>( 30 ); } }
public InMemoryDataCache( final int maximumEntries, final int maximumRows ) { this.maximumEntries = maximumEntries; this.maximumRows = maximumRows; cacheManager = new InMemoryCacheManager(); dataCache = new LFUMap<DataCacheKey, TableModel>( maximumEntries ); }
public DefaultDataAttributeCache() { DebugLog.log( this.toString() ); this.backend = new LFUMap<CacheKey, ImmutableDataAttributes>( 5000 ); }
public BoxDefinitionFactory() { this.cacheKey = new CacheKey(); this.cache = new LFUMap<CacheKey, CacheCarrier>( 500 ); }
public PdfDocumentWriter( final PdfOutputProcessorMetaData metaData, final OutputStream out, final ResourceManager resourceManager ) { if ( metaData == null ) { throw new NullPointerException(); } if ( out == null ) { throw new NullPointerException(); } if ( resourceManager == null ) { throw new NullPointerException(); } this.imageCache = new LFUMap<ResourceKey, com.lowagie.text.Image>( 50 ); this.resourceManager = resourceManager; this.metaData = metaData; this.out = out; this.config = metaData.getConfiguration(); }
public DefaultStyleBuilder( ) { this.lineSeparator = StringUtils.getLineSeparator(); this.cachedBorderStyle = new LFUMap<BorderEdge, String>( 30 ); this.cachedCornerStyle = new LFUMap<BorderCorner, String>( 30 ); this.buffer = new StringBuffer( 100 ); this.usedStyles = new StyleCarrier[CSSKeys.values().length]; if ( "true".equals( ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty( "org.pentaho.reporting.engine.classic.core.modules.output.table.html.SafariLengthHack" ) ) ) { pointConverter = new DecimalFormat( "0", new DecimalFormatSymbols( Locale.US ) ); } else { pointConverter = new DecimalFormat( "0.####", new DecimalFormatSymbols( Locale.US ) ); } }
public DefaultStyleBuilder( final StyleBuilderFactory factory ) { this.factory = factory; this.lineSeparator = StringUtils.getLineSeparator(); this.cachedBorderStyle = new LFUMap<BorderEdge, String>( 30 ); this.cachedCornerStyle = new LFUMap<BorderCorner, String>( 30 ); this.buffer = new StringBuffer( 100 ); this.usedStyles = new StyleCarrier[CSSKeys.values().length]; if ( "true".equals( ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty( "org.pentaho.reporting.engine.classic.core.modules.output.table.html.SafariLengthHack" ) ) ) { pointConverter = new DecimalFormat( "0", new DecimalFormatSymbols( Locale.US ) ); } else { pointConverter = new DecimalFormat( "0.####", new DecimalFormatSymbols( Locale.US ) ); } }
protected AbstractOutputProcessorMetaData( final FontStorage fontStorage ) { if ( fontStorage == null ) { throw new NullPointerException(); } this.booleanFeatures = new HashSet<OutputProcessorFeature.BooleanOutputProcessorFeature>(); this.numericFeatures = new HashMap<OutputProcessorFeature.NumericOutputProcessorFeature, Double>(); this.reusableFontContext = new ReusableFontContext(); this.fontMetricsCache = new HashMap<FontMetricsKey, FontMetrics>(); // needs to be a strong reference .. this.baselinesCache = new LFUMap<FontMetricsKey, ExtendedBaselineInfo>( 200 ); this.lookupKey = new FontMetricsKey(); this.lookupCacheKey = new CacheKey(); this.fontMetricsByStyleCache = new LFUMap<CacheKey, StyleCacheEntry>( 200 ); this.fontFamilyMapping = new HashMap<String, String>(); this.fontRegistry = fontStorage.getFontRegistry(); this.fontStorage = fontStorage; setFamilyMapping( null, "SansSerif" ); }
public DefaultStyleCache() { this.lookupKey = new CacheKey(); this.cache = new LFUMap<CacheKey, CacheCarrier>( 500 ); this.validateCache = "true".equals( ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty( "org.pentaho.reporting.engine.classic.core.layout.style.ValidateStyleCacheResults" ) ); }
getITextFontStorage().setDefaultEncoding( defaultEncoding ); normalizedFontNameCache = new LFUMap<String, String>( 500 );
context.failureCache = new LFUMap<Object, Boolean>( 5 );