Examples of SunTileCache


Examples of com.sun.media.jai.util.SunTileCache

     * belonging to the default<code>JAI</code>instance.  To force an operation
     * not to perform caching, a <code>TileCache</code> instance with
     * a tile capacity of 0 may be used.
     */
    public static TileCache createTileCache() {
        return new SunTileCache();
    }
View Full Code Here

Examples of com.sun.media.jai.util.SunTileCache

/*      */   public static TileCache createTileCache(int tileCapacity, long memCapacity)
/*      */   {
/*  871 */     if (memCapacity < 0L) {
/*  872 */       throw new IllegalArgumentException(JaiI18N.getString("JAI10"));
/*      */     }
/*  874 */     return new SunTileCache(memCapacity);
/*      */   }
View Full Code Here

Examples of com.sun.media.jai.util.SunTileCache

/*      */   public static TileCache createTileCache(long memCapacity)
/*      */   {
/*  894 */     if (memCapacity < 0L) {
/*  895 */       throw new IllegalArgumentException(JaiI18N.getString("JAI10"));
/*      */     }
/*  897 */     return new SunTileCache(memCapacity);
/*      */   }
View Full Code Here

Examples of com.sun.media.jai.util.SunTileCache

/*  897 */     return new SunTileCache(memCapacity);
/*      */   }
/*      */
/*      */   public static TileCache createTileCache()
/*      */   {
/*  913 */     return new SunTileCache();
/*      */   }
View Full Code Here

Examples of com.sun.media.jai.util.SunTileCache

        assertImageEquals(cropped, gtCropped);
    }

    @Test
    public void testTileCache() {
        TileCache tc = new SunTileCache();
        RenderingHints hints = new RenderingHints(JAI.KEY_TILE_CACHE, tc);
       
        BufferedImage source = buildSource();
        ParameterBlock pb = buildParameterBlock(source);
       
View Full Code Here

Examples of com.sun.media.jai.util.SunTileCache

            jaiDef.setRenderingHint(JAI.KEY_TILE_FACTORY, recyclingFactory);
            jaiDef.setRenderingHint(JAI.KEY_TILE_RECYCLER, recyclingFactory);
        }
       
        // Setting up Cache Capacity
        SunTileCache jaiCache = (SunTileCache) jaiDef.getTileCache();
        jai.setTileCache( jaiCache );
       
        long jaiMemory = (long) (jai.getMemoryCapacity() * Runtime.getRuntime().maxMemory());
        jaiCache.setMemoryCapacity(jaiMemory);
       
        // Setting up Cache Threshold
        jaiCache.setMemoryThreshold((float) jai.getMemoryThreshold());
       
        jaiDef.getTileScheduler().setParallelism(jai.getTileThreads());
        jaiDef.getTileScheduler().setPrefetchParallelism(jai.getTileThreads());
        jaiDef.getTileScheduler().setPriority(jai.getTilePriority());
        jaiDef.getTileScheduler().setPrefetchPriority(jai.getTilePriority());
View Full Code Here

Examples of com.sun.media.jai.util.SunTileCache

       
        add(new Link("free.memory.jai") {
            private static final long serialVersionUID = 1L;

            public void onClick() {
                SunTileCache jaiCache = getGeoServer().getGlobal().getJAI().getTileCache();
                final long capacityBefore = jaiCache.getMemoryCapacity();
                jaiCache.flush();
                jaiCache.setMemoryCapacity(0); // to be sure we realease all tiles
                System.gc();
                System.runFinalization();
                jaiCache.setMemoryCapacity(capacityBefore);
                updateModel();
            }
        });
       
        int fontCount =  GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts().length;
View Full Code Here

Examples of com.sun.media.jai.util.SunTileCache

        GeoServerInfo geoServerInfo = getGeoServer().getGlobal();
        JAIInfo jaiInfo = geoServerInfo.getJAI();
        JAI jai =  jaiInfo.getJAI();
        CoverageAccessInfo coverageAccess = geoServerInfo.getCoverageAccess();
        SunTileCache jaiCache = jaiInfo.getTileCache();

        values.put(KEY_JAI_MAX_MEM, formatMemory(jaiCache.getMemoryCapacity()));
        values.put(KEY_JAI_MEM_USAGE, formatMemory(jaiCache.getCacheMemoryUsed()));
        values.put(KEY_JAI_MEM_THRESHOLD, Float.toString(100.0f * jaiCache.getMemoryThreshold()));
        values.put(KEY_JAI_TILE_THREADS, Integer.toString(jai.getTileScheduler().getParallelism()));
        values.put(KEY_JAI_TILE_THREAD_PRIORITY, Integer.toString(jai.getTileScheduler()
                .getPriority()));
       
        values.put(KEY_COVERAGEACCESS_CORE_POOL_SIZE, Integer.toString(coverageAccess.getCorePoolSize()));
View Full Code Here

Examples of com.sun.media.jai.util.SunTileCache

                jaiDef.setRenderingHint(JAI.KEY_TILE_RECYCLER, passThroughFactory);
            }
        }
       
        // Setting up Cache Capacity
        SunTileCache jaiCache = (SunTileCache) jaiDef.getTileCache();
        jai.setTileCache( jaiCache );
       
        long jaiMemory = (long) (jai.getMemoryCapacity() * Runtime.getRuntime().maxMemory());
        jaiCache.setMemoryCapacity(jaiMemory);
       
        // Setting up Cache Threshold
        jaiCache.setMemoryThreshold((float) jai.getMemoryThreshold());
       
        jaiDef.getTileScheduler().setParallelism(jai.getTileThreads());
        jaiDef.getTileScheduler().setPrefetchParallelism(jai.getTileThreads());
        jaiDef.getTileScheduler().setPriority(jai.getTilePriority());
        jaiDef.getTileScheduler().setPrefetchPriority(jai.getTilePriority());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.