Package com.lightcrafts.mediax.jai

Examples of com.lightcrafts.mediax.jai.CachedTile


    public synchronized void update(Observable possibleSunTileCache,
                                    Object possibleCachedTile) {

        LCTileCache lc_tile_cache = null;
        CachedTile cached_tile = null;
        int cache_event = -1;

        // check SunTileCache
        if ( possibleSunTileCache instanceof LCTileCache ) {
            lc_tile_cache = (LCTileCache) possibleSunTileCache;
        } else {
            return;
        }

        // check cached tile
        if ( (possibleCachedTile != null) &&
             (possibleCachedTile instanceof CachedTile) ) {
            cached_tile = (CachedTile) possibleCachedTile;
            cache_event = cached_tile.getAction();

            if ( cache_event == CACHE_EVENT_ABOUT_TO_REMOVE_TILE ) {
                return;
            }
        } else {
            return;
        }

        // collect information
        RenderedImage image  = (RenderedImage) cached_tile.getOwner();

        final long tileSize    = cached_tile.getTileSize();
        final long timeStamp   = cached_tile.getTileTimeStamp();
        final long cacheHits   = lc_tile_cache.getCacheHitCount();
        final long cacheMisses = lc_tile_cache.getCacheMissCount();
        final long tileCount   = lc_tile_cache.getCacheTileCount();

        float memoryCapacity = (float) lc_tile_cache.getMemoryCapacity();
View Full Code Here

TOP

Related Classes of com.lightcrafts.mediax.jai.CachedTile

Copyright © 2018 www.massapicom. 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.