@Override public ClientRegionFactory<K, V> setCompressor(Compressor compressor) { this.attrsFactory.setCompressor(compressor); return this; }
/** * Set the compressor to be used by this region for compressing * region entry values. * @param compressor a compressor * @return a reference to this RegionFactory instance * @since 7.5 */ public RegionFactory<K,V> setCompressor(Compressor compressor) { this.attrsFactory.setCompressor(compressor); return this; }
@Override public ClientRegionFactory<K, V> setCompressor(Compressor compressor) { this.attrsFactory.setCompressor(compressor); return this; }
/** * Set the compressor to be used by this region for compressing * region entry values. * @param compressor a compressor * @return a reference to this RegionFactory instance * @since 8.0 */ public RegionFactory<K,V> setCompressor(Compressor compressor) { this.attrsFactory.setCompressor(compressor); return this; }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes() { Compressor compressor = null; try { compressor = SnappyCompressor.getDefaultInstance(); } catch (Throwable t) { // Not a supported OS return super.getRegionAttributes(); } RegionAttributes attrs = super.getRegionAttributes(); AttributesFactory factory = new AttributesFactory(attrs); factory.setCompressor(compressor); return factory.create(); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes() { Compressor compressor = null; try { compressor = SnappyCompressor.getDefaultInstance(); } catch (Throwable t) { // Not a supported OS return super.getRegionAttributes(); } RegionAttributes attrs = super.getRegionAttributes(); AttributesFactory factory = new AttributesFactory(attrs); factory.setCompressor(compressor); return factory.create(); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes() { Compressor compressor = null; try { compressor = SnappyCompressor.getDefaultInstance(); } catch (Throwable t) { // Not a supported OS return super.getRegionAttributes(); } RegionAttributes attrs = super.getRegionAttributes(); AttributesFactory factory = new AttributesFactory(attrs); factory.setCompressor(compressor); return factory.create(); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes() { Compressor compressor = null; try { compressor = SnappyCompressor.getDefaultInstance(); } catch (Throwable t) { // Not a supported OS return super.getRegionAttributes(); } RegionAttributes attrs = super.getRegionAttributes(); AttributesFactory factory = new AttributesFactory(attrs); factory.setCompressor(compressor); return factory.create(); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes() { Compressor compressor = null; try { compressor = SnappyCompressor.getDefaultInstance(); } catch (Throwable t) { // Not a supported OS return super.getRegionAttributes(); } RegionAttributes attrs = super.getRegionAttributes(); AttributesFactory factory = new AttributesFactory(attrs); factory.setCompressor(compressor); return factory.create(); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes() { Compressor compressor = null; try { compressor = SnappyCompressor.getDefaultInstance(); } catch (Throwable t) { // Not a supported OS return super.getRegionAttributes(); } RegionAttributes attrs = super.getRegionAttributes(); AttributesFactory factory = new AttributesFactory(attrs); factory.setCompressor(compressor); return factory.create(); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes(String type) { Compressor compressor = null; try { compressor = SnappyCompressor.getDefaultInstance(); } catch (Throwable t) { // Not a supported OS return super.getRegionAttributes(type); } RegionAttributes ra = super.getRegionAttributes(type); AttributesFactory factory = new AttributesFactory(ra); if(!ra.getDataPolicy().isEmpty()) { factory.setCompressor(compressor); } return factory.create(); } }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes(String type) { Compressor compressor = null; try { compressor = SnappyCompressor.getDefaultInstance(); } catch (Throwable t) { // Not a supported OS return super.getRegionAttributes(type); } RegionAttributes ra = super.getRegionAttributes(type); AttributesFactory factory = new AttributesFactory(ra); if(!ra.getDataPolicy().isEmpty()) { factory.setCompressor(compressor); } return factory.create(); } }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes(String type) { Compressor compressor = null; try { compressor = SnappyCompressor.getDefaultInstance(); } catch (Throwable t) { // Not a supported OS return super.getRegionAttributes(type); } RegionAttributes ra = super.getRegionAttributes(type); AttributesFactory factory = new AttributesFactory(ra); if(!ra.getDataPolicy().isEmpty()) { factory.setCompressor(compressor); } return factory.create(); } }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes(String type) { Compressor compressor = null; try { compressor = SnappyCompressor.getDefaultInstance(); } catch (Throwable t) { // Not a supported OS return super.getRegionAttributes(type); } RegionAttributes ra = super.getRegionAttributes(type); AttributesFactory factory = new AttributesFactory(ra); if(!ra.getDataPolicy().isEmpty()) { factory.setCompressor(compressor); } return factory.create(); } }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes(String type) { Compressor compressor = null; try { compressor = SnappyCompressor.getDefaultInstance(); } catch (Throwable t) { // Not a supported OS return super.getRegionAttributes(type); } RegionAttributes ra = super.getRegionAttributes(type); AttributesFactory factory = new AttributesFactory(ra); if(!ra.getDataPolicy().isEmpty()) { factory.setCompressor(compressor); } return factory.create(); } }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected RegionAttributes getRegionAttributes(String type) { Compressor compressor = null; try { compressor = SnappyCompressor.getDefaultInstance(); } catch (Throwable t) { // Not a supported OS return super.getRegionAttributes(type); } RegionAttributes ra = super.getRegionAttributes(type); AttributesFactory factory = new AttributesFactory(ra); if(!ra.getDataPolicy().isEmpty()) { factory.setCompressor(compressor); } return factory.create(); } }
public static void createPR(String partitionedRegionName, Integer redundancy, Integer localMaxMemory, Integer totalNumBuckets, Boolean setExpiry, Compressor compressor) { PartitionAttributesFactory paf = new PartitionAttributesFactory(); PartitionAttributes prAttr = paf.setRedundantCopies(redundancy.intValue()) .setLocalMaxMemory(localMaxMemory.intValue()).setTotalNumBuckets( totalNumBuckets.intValue()).create(); AttributesFactory attr = new AttributesFactory(); attr.setPartitionAttributes(prAttr); attr.setDataPolicy(DataPolicy.PARTITION); attr.setConcurrencyChecksEnabled(true); if (setExpiry) { attr.setStatisticsEnabled(true); attr.setEntryIdleTimeout(new ExpirationAttributes(1, ExpirationAction.INVALIDATE)); } if (compressor != null) { attr.setCompressor(compressor); } //attr.setEvictionAttributes(EvictionAttributes.createLRUEntryAttributes(5)); assertNotNull(cache); deltaPR = cache.createRegion(partitionedRegionName, attr.create()); assertNotNull(deltaPR); getLogWriter().info( "Partitioned Region " + partitionedRegionName + " created Successfully :" + deltaPR); }
factory.setCompressor(compressor);
f.setCloningEnabled(this.getCloningEnabled().booleanValue()); if (this.getCompressor() != null) { f.setCompressor(this.getCompressorInstance(instantiate));
protected void configAndStartBridgeServer(boolean isPr, boolean isAccessor, boolean asyncIndex, Compressor compressor) { AttributesFactory factory = new AttributesFactory(); if (isPr) { PartitionAttributesFactory paf = new PartitionAttributesFactory(); //factory.setDataPolicy(DataPolicy.PARTITION); if (isAccessor){ paf.setLocalMaxMemory(0); } PartitionAttributes prAttr = paf.setTotalNumBuckets(20).setRedundantCopies(0).create(); factory.setPartitionAttributes(prAttr); } else { factory.setScope(Scope.DISTRIBUTED_ACK); factory.setDataPolicy(DataPolicy.REPLICATE); } if (asyncIndex) { factory.setIndexMaintenanceSynchronous(!asyncIndex); } if (compressor != null) { factory.setCompressor(compressor); } createRegion(this.regionName, this.rootRegionName, factory.create()); createRegion(this.regionName2, this.rootRegionName, factory.create()); try { startBridgeServer(0, false); } catch (Exception ex) { fail("While starting CacheServer", ex); } }