public JDBCConfiguration getJDBCDiskQuotaConfig() throws IOException, org.geowebcache.config.ConfigurationException { return jdbcConfigurationStorage.getJDBCDiskQuotaConfig(); }
/** * Checks the JDBC quota store can be instantiated * * @param jdbcConfiguration The JDBC Quota Store configuration * @throws ConfigurationException if the quota store cannot be instantiated */ public void testQuotaConfiguration(JDBCConfiguration jdbcConfiguration) throws ConfigurationException, IOException { jdbcConfigurationStorage.testQuotaConfiguration(jdbcConfiguration); }
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(); }
private QuotaStore loadJDBCQuotaStore( ApplicationContext applicationContext, String quotaStoreName) throws ConfigurationException, IOException { // special case for the JDBC quota store, allows us to unencrypt passwords before // creating the GUI JDBCConfiguration config = jdbcConfigManager.getJDBCDiskQuotaConfig(); JDBCQuotaStoreFactory factory = new JDBCQuotaStoreFactory(); factory.setApplicationContext(applicationContext); return factory.getJDBCStore(applicationContext, config); } }
JDBCConfiguration config = getJDBCDiskQuotaConfig(); if (config != null) { Resource configFile = configDir.get("geowebcache-diskquota-jdbc.xml");