Package org.geowebcache.diskquota

Examples of org.geowebcache.diskquota.DiskQuotaMonitor


        return filteredLayers;
    }

    public DiskQuotaConfig getDisQuotaConfig() {
        DiskQuotaMonitor monitor = getDiskQuotaMonitor();
        if (!monitor.isEnabled()) {
            return null;
        }
        return monitor.getConfig();
    }
View Full Code Here


        }
        return monitor.getConfig();
    }

    private DiskQuotaMonitor getDiskQuotaMonitor() {
        DiskQuotaMonitor monitor = (DiskQuotaMonitor) appContext.getBean("DiskQuotaMonitor");
        Assert.notNull(monitor);
        return monitor;
    }
View Full Code Here

        Assert.notNull(monitor);
        return monitor;
    }

    public void saveDiskQuotaConfig() {
        DiskQuotaMonitor monitor = getDiskQuotaMonitor();
        monitor.saveConfig();
    }
View Full Code Here

            layerRemoved(removedLayerName);
        }
       
        // reload the quota config
        try {
            DiskQuotaMonitor monitor = getDiskQuotaMonitor();
            monitor.reloadConfig();
            ConfigurableQuotaStoreProvider provider = (ConfigurableQuotaStoreProvider) monitor.getQuotaStoreProvider();
            provider.reloadQuotaStore();
           
            // restart the monitor, the quota store might have been changed and pointed to another DB
            // and we need to re-init the tile pages
            monitor.shutDown(1);
            monitor.startUp();
        } catch(Exception e) {
            log.log(Level.SEVERE, "Failed to reload the disk quoa configuration", e);
        }
    }
View Full Code Here

     * </p>
     *
     * @return whether the disk quota module is available at all.
     */
    public boolean isDiskQuotaAvailable() {
        DiskQuotaMonitor diskQuotaMonitor = getDiskQuotaMonitor();
        return diskQuotaMonitor.isEnabled();
    }
View Full Code Here

     * </p>
     *
     * @return whether the disk quota module is available at all.
     */
    public boolean isDiskQuotaEnabled() {
        DiskQuotaMonitor diskQuotaMonitor = getDiskQuotaMonitor();
        return diskQuotaMonitor.getConfig().isEnabled();
    }
View Full Code Here

     */
    public DiskQuotaConfig getDiskQuotaConfig() {
        if (!isDiskQuotaAvailable()) {
            return null;
        }
        DiskQuotaMonitor monitor = getDiskQuotaMonitor();
        return monitor.getConfig();
    }
View Full Code Here

    }

    public void saveDiskQuotaConfig(DiskQuotaConfig config, JDBCConfiguration jdbcConfig) throws ConfigurationException, IOException, InterruptedException {
        // save the configuration
        checkArgument(isDiskQuotaAvailable(), "DiskQuota is not enabled");
        DiskQuotaMonitor monitor = getDiskQuotaMonitor();
        monitor.saveConfig(config);
        jdbcConfigurationStorage.saveDiskQuotaConfig(config, jdbcConfig);
       
        // GeoServer own GWC is wired up to use the ConfigurableQuotaStoreProvider, force it to reload
        ConfigurableQuotaStoreProvider provider = (ConfigurableQuotaStoreProvider) monitor.getQuotaStoreProvider();
        provider.reloadQuotaStore();
       
        // restart the monitor, the quota store might have been changed and pointed to another DB
        // and we need to re-init the tile pages
        monitor.shutDown(1);
        monitor.startUp();
    }
View Full Code Here

TOP

Related Classes of org.geowebcache.diskquota.DiskQuotaMonitor

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.