DiskStoreHelper.getDiskStoreDescription(diskStoreConfig); DiskStoreFactory dummyFactory = ((CacheCreation)dummyCache).createDiskStoreFactory(); dsd.configure(dummyFactory); String diskStoreName = dsd.getName();
public void testDiskStoreValidation() throws CacheException { CacheCreation cache = new CacheCreation(); DiskStoreFactory dsf = cache.createDiskStoreFactory(); DiskStore ds1 = dsf.create(getUniqueName());
File overflowDirectory = new File(getName()); overflowDirectory.mkdir(); DiskStoreFactory dsf = cache.createDiskStoreFactory(); File[] dirs1 = new File[] {overflowDirectory.getAbsoluteFile()}; DiskStore ds1 = dsf.setDiskDirs(dirs1).create(diskStoreName);
File overflowDirectory = new File("overFlow"); overflowDirectory.mkdirs(); DiskStoreFactory dsf = cache.createDiskStoreFactory(); File[] dirs1 = new File[] {overflowDirectory}; DiskStore ds1 = dsf.setDiskDirs(dirs1).create(getUniqueName());
public void testDiskStore() throws CacheException { CacheCreation cache = new CacheCreation(); DiskStoreFactory dsf = cache.createDiskStoreFactory(); File[] dirs1 = new File[] {new File("").getAbsoluteFile()}; DiskStore ds1 = dsf.setAllowForceCompaction(true)
public void testRedefineOfDefaultDiskStore() throws CacheException { CacheCreation cache = new CacheCreation(); DiskStoreFactory dsf = cache.createDiskStoreFactory(); dsf.setAutoCompact(!DiskStoreFactory.DEFAULT_AUTO_COMPACT); DiskStore ds1 = dsf.create(DiskStoreFactory.DEFAULT_DISK_STORE_NAME); RegionAttributesCreation attrs = new RegionAttributesCreation(cache); attrs.setScope(Scope.DISTRIBUTED_ACK); attrs.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE); AttributesFactory factory = new AttributesFactory(attrs); RegionAttributes ra = factory.create(); RegionCreation root; try { root = (RegionCreation)cache.createRegion("root", ra); } catch (Exception ex) { fail("Unexpected exception", ex); } testXml(cache); Cache c = getCache(); assertNotNull(c); DiskStore ds2 = c.findDiskStore(DiskStoreFactory.DEFAULT_DISK_STORE_NAME); assertNotNull(ds2); assertEquals(ds1.getAutoCompact(), ds2.getAutoCompact()); }
public void testDiskStoreFactory() throws CacheException { CacheCreation cache = new CacheCreation(); DiskStoreFactory dsf = cache.createDiskStoreFactory();