@Override public ClientRegionFactory<K, V> setDiskStoreName(String name) { this.attrsFactory.setDiskStoreName(name); return this; }
/** * Sets the DiskStore name attribute. This causes the region to belong to the DiskStore. * * @param name the name of the diskstore * @return a reference to this RegionFactory object * @since GemFire 6.5 * * @see AttributesFactory#setDiskStoreName */ public RegionFactory<K, V> setDiskStoreName(String name) { this.attrsFactory.setDiskStoreName(name); return this; }
factory.setDiskStoreName(overflowDir); } else if (overflowDir == null || overflowDir.equals(ClientSubscriptionConfig.DEFAULT_OVERFLOW_DIRECTORY)) { factory.setDiskStoreName(null); dsf.setAutoCompact(true).setDiskDirsAndSizes(dirs, new int[] {MAX_VALUE}).create("bsi"); factory.setDiskStoreName("bsi");
@Override public void run2() throws CacheException { RegionAttributes<Object, Object> ra = getRegionAttributes(); AttributesFactory<Object, Object> factory = new AttributesFactory<>(ra); if (ra.getEvictionAttributes() == null || !ra.getEvictionAttributes().getAction().isOverflowToDisk()) { factory.setDiskStoreName(null); } factory.setDataPolicy(DataPolicy.REPLICATE); createRegion(name, factory.create()); } });
@Override public void run2() throws CacheException { RegionAttributes<Object, Object> ra = getRegionAttributes(); AttributesFactory<Object, Object> factory = new AttributesFactory<>(ra); if (ra.getEvictionAttributes() == null || !ra.getEvictionAttributes().getAction().isOverflowToDisk()) { factory.setDiskStoreName(null); } factory.setDataPolicy(DataPolicy.REPLICATE); factory.addCacheListener(new MirroredDataFromNonMirroredListener()); createRegion(name, factory.create()); } });
regionAttrsFactory.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE); regionAttrsFactory.setCacheListener(new ConfigurationChangeListener(this, cache)); regionAttrsFactory.setDiskStoreName(CLUSTER_CONFIG_DISK_STORE_NAME); regionAttrsFactory.setScope(Scope.DISTRIBUTED_ACK); InternalRegionArguments internalArgs = new InternalRegionArguments();
factory.setConcurrencyChecksEnabled(false); factory.setDiskStoreName(this.diskStoreName);
@Override public void run2() throws CacheException { RegionAttributes<Object, Object> ra = getRegionAttributes(); AttributesFactory<Object, Object> factory = new AttributesFactory<>(ra); if (ra.getEvictionAttributes() == null || !ra.getEvictionAttributes().getAction().isOverflowToDisk()) { factory.setDiskStoreName(null); } factory.setDataPolicy(DataPolicy.REPLICATE); setLoader(new TestCacheLoader<Object, Object>() { @Override public Object load2(LoaderHelper<Object, Object> helper) throws CacheLoaderException { fail("Should not be invoked"); return null; } }); factory.setCacheLoader(loader()); createRegion(name, factory.create()); } };
fact.setDiskStoreName(sender.getDiskStoreName());
EvictionAttributes.createLRUHeapAttributes(null, EvictionAction.OVERFLOW_TO_DISK)); factory.setDiskSynchronous(true); factory.setDiskStoreName(cache.createDiskStoreFactory() .setDiskDirs(new java.io.File[] {new java.io.File(System.getProperty("user.dir"))}) .create("TestHeapLRU").getName());
protected <K, V> Region<K, V> createRegion(final String regionName, final RegionShortcut regionShortCut, final String colocatedWithRegionName, final PartitionAttributes partitionAttributes, final RegionAttributes regionAttributes, PartitionListener lucenePrimaryBucketListener) { PartitionAttributesFactory partitionAttributesFactory = new PartitionAttributesFactory(); if (lucenePrimaryBucketListener != null) { partitionAttributesFactory.addPartitionListener(lucenePrimaryBucketListener); } partitionAttributesFactory.setColocatedWith(colocatedWithRegionName); configureLuceneRegionAttributesFactory(partitionAttributesFactory, partitionAttributes); // Create AttributesFactory based on input RegionShortcut RegionAttributes baseAttributes = this.cache.getRegionAttributes(regionShortCut.toString()); AttributesFactory factory = new AttributesFactory(baseAttributes); factory.setPartitionAttributes(partitionAttributesFactory.create()); if (regionAttributes.getDataPolicy().withPersistence()) { factory.setDiskStoreName(regionAttributes.getDiskStoreName()); } RegionAttributes<K, V> attributes = factory.create(); return createRegion(regionName, attributes); }
fact.setDiskStoreName(sender.getDiskStoreName());
if (cache.getPdxPersistent()) { if (cache.getCacheConfig().pdxDiskStoreUserSet) { factory.setDiskStoreName(cache.getPdxDiskStore()); } else { factory.setDiskStoreName(cache.getOrCreateDefaultDiskStore().getName());
factory.setDiskStoreName("TestDiskRegion"); LocalRegion region = (LocalRegion) cache.createRegion("TestDiskRegion", factory.create()); DiskRegion dr = region.getDiskRegion();
DirectoryHolder.SET_DIRECTORY_SIZE_IN_BYTES_FOR_TESTING_PURPOSES = true; try { factory.setDiskStoreName(dsf.create(diskProps.getRegionName()).getName()); } finally { DirectoryHolder.SET_DIRECTORY_SIZE_IN_BYTES_FOR_TESTING_PURPOSES = false;
factory.setDiskStoreName("ds1"); DiskWriteAttributesFactory dwaf = new DiskWriteAttributesFactory(); try { factory.setDiskWriteAttributes(dwaf2.create()); try { factory.setDiskStoreName("ds1"); fail("Should have thrown an IllegalStateException"); } catch (Exception ex) { factory.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE); File[] dirs1 = new File[] {new File("").getAbsoluteFile()}; factory.setDiskStoreName("ds1"); factory.setDiskDirs(dirs2); try { factory.setDiskStoreName("ds1"); fail("Should have thrown an IllegalStateException"); } catch (Exception ex) {