/** * This method changes the {@link ConfigurableBlobStore} configuration. It can be used for * changing cache configuration or the blobstore used. * * @param gwcConfig */ public synchronized void setChanged(GWCConfig gwcConfig, boolean initialization) { // Change the blobstore configuration configureBlobStore(gwcConfig, initialization); }
gwcConfig.setInnerCachingEnabled(true); gwcConfig.setEnabledPersistence(false); blobStore.setChanged(gwcConfig, false); blobStore.setCache(cacheProvider1); assertTrue(blobStore.getDelegate() instanceof MemoryBlobStore); assertTrue(((MemoryBlobStore) blobStore.getDelegate()).getStore() instanceof NullBlobStore); "test:123123 112", xyz, "EPSG:4326", "image/jpeg", parameters, bytes); blobStore.put(to); blobStore.get(to2); TileObject.createQueryTileObject( "test:123123 112", xyz, "EPSG:4326", "image/jpeg", parameters); blobStore.delete(to5); TileObject.createQueryTileObject( "test:123123 112", xyz, "EPSG:4326", "image/jpeg", parameters); assertFalse(blobStore.get(to6));
if (!blobStore.getCacheProviders().containsKey(cacheProviderClass)) { gwcConfig.setCacheProviderClass(GuavaCacheProvider.class.toString()); configPersister.save(gwcConfig); blobStore.setChanged(gwcConfig, true); CacheProvider cache = blobStore.getCache();
@Before public void setup() throws IOException { // Setup the fileBlobStore File dataDirectoryRoot = getTestData().getDataDirectoryRoot(); MemoryBlobStore mbs = new MemoryBlobStore(); NullBlobStore nbs = new NullBlobStore(); directory = new File(dataDirectoryRoot, "testConfigurableBlobStore"); if (directory.exists()) { FileUtils.deleteDirectory(directory); } directory.mkdirs(); BlobStore defaultStore = new FileBlobStore(directory.getAbsolutePath()); blobStore = new ConfigurableBlobStore(defaultStore, mbs, nbs); blobStore.setCache(cache); }
if (!getCacheProviders().containsKey(cacheProvider)) { if (LOGGER.isLoggable(Level.WARNING)) { LOGGER.warning("Wrong CacheProvider defined, using default one"); cache = getCacheProviders().get(cacheProvider);