Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GEODE-7161: Remove AttributesFactory in geode-redis #4008

Merged
merged 1 commit into from
Sep 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import org.apache.geode.LogWriter;
import org.apache.geode.annotations.Experimental;
import org.apache.geode.annotations.internal.MakeNotStatic;
import org.apache.geode.cache.AttributesFactory;
import org.apache.geode.cache.Cache;
import org.apache.geode.cache.CacheFactory;
import org.apache.geode.cache.DataPolicy;
Expand All @@ -64,6 +63,7 @@
import org.apache.geode.internal.cache.GemFireCacheImpl;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.internal.cache.InternalRegionArguments;
import org.apache.geode.internal.cache.xmlcache.RegionAttributesCreation;
import org.apache.geode.internal.hll.HyperLogLogPlus;
import org.apache.geode.internal.net.SocketCreator;
import org.apache.geode.redis.internal.ByteArrayWrapper;
Expand Down Expand Up @@ -428,12 +428,13 @@ private void initializeRedis() {
hLLRegion = regionFactory.create(HLL_REGION);
}
if ((redisMetaData = cache.getRegion(REDIS_META_DATA_REGION)) == null) {
AttributesFactory af = new AttributesFactory();
af.addCacheListener(metaListener);
af.setDataPolicy(DataPolicy.REPLICATE);
RegionAttributesCreation regionAttributesCreation = new RegionAttributesCreation();
regionAttributesCreation.addCacheListener(metaListener);
regionAttributesCreation.setDataPolicy(DataPolicy.REPLICATE);
InternalRegionArguments ira =
new InternalRegionArguments().setInternalRegion(true).setIsUsedForMetaRegion(true);
redisMetaData = gemFireCache.createVMRegion(REDIS_META_DATA_REGION, af.create(), ira);
redisMetaData =
gemFireCache.createVMRegion(REDIS_META_DATA_REGION, regionAttributesCreation, ira);
}
} catch (IOException | ClassNotFoundException e) {
// only if loading snapshot, not here
Expand Down