@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();
 }