private void updateModel() { values.put(KEY_DATA_DIR, getDataDirectory()); values.put(KEY_LOCKS, Long.toString(getLockCount())); values.put(KEY_CONNECTIONS, Long.toString(getConnectionCount())); values.put(KEY_MEMORY, formatUsedMemory()); values.put( KEY_JVM_VERSION, System.getProperty("java.vendor") + ": " + System.getProperty("java.version") + " (" + System.getProperty("java.vm.name") + ")"); values.put(KEY_JAI_AVAILABLE, Boolean.toString(isNativeJAIAvailable())); values.put(KEY_JAI_IMAGEIO_AVAILABLE, Boolean.toString(PackageUtil.isCodecLibAvailable())); GeoServerInfo geoServerInfo = getGeoServer().getGlobal(); JAIInfo jaiInfo = geoServerInfo.getJAI(); JAI jai = jaiInfo.getJAI(); CoverageAccessInfo coverageAccess = geoServerInfo.getCoverageAccess(); TileCache jaiCache = jaiInfo.getTileCache(); values.put(KEY_JAI_MAX_MEM, formatMemory(jaiCache.getMemoryCapacity())); if (jaiCache instanceof CacheDiagnostics) { values.put( KEY_JAI_MEM_USAGE, formatMemory(((CacheDiagnostics) jaiCache).getCacheMemoryUsed())); } else { values.put(KEY_JAI_MEM_USAGE, "-"); } values.put( KEY_JAI_MEM_THRESHOLD, Integer.toString((int) (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())); values.put(KEY_COVERAGEACCESS_MAX_POOL_SIZE, Integer.toString(coverageAccess.getMaxPoolSize())); values.put( KEY_COVERAGEACCESS_KEEP_ALIVE_TIME, Integer.toString(coverageAccess.getKeepAliveTime())); values.put(KEY_UPDATE_SEQUENCE, Long.toString(geoServerInfo.getUpdateSequence())); values.put(KEY_JAVA_RENDERER, checkRenderer()); }
public Boolean getJPEGNativeAcceleration() { JAIInfo jaiInfo = getJaiInfo(); return Boolean.valueOf(jaiInfo.isJpegAcceleration()); }
public JAIInfo.PngEncoderType getPNGEncoderType() { JAIInfo jaiInfo = getJaiInfo(); return jaiInfo.getPngEncoderType(); }