@Override public Region createSubregion(String subregionName, RegionAttributes aRegionAttributes) throws RegionExistsException, TimeoutException { try { return createSubregion(subregionName, aRegionAttributes, new InternalRegionArguments().setDestroyLockFlag(true).setRecreateFlag(false)); } catch (IOException | ClassNotFoundException e) { // only happens when loading a snapshot, not here throw new InternalGemFireError( "unexpected exception", e); } }
private HARegion(String regionName, RegionAttributes attrs, LocalRegion parentRegion, InternalCache cache) { super(regionName, attrs, parentRegion, cache, new InternalRegionArguments().setDestroyLockFlag(true).setRecreateFlag(false) .setSnapshotInputStream(null).setImageTarget(null)); this.haRegionStats = new DummyCachePerfStats(); }
protected SerialGatewaySenderQueueMetaRegion(String regionName, RegionAttributes attrs, LocalRegion parentRegion, InternalCache cache, AbstractGatewaySender sender) { super(regionName, attrs, parentRegion, cache, new InternalRegionArguments().setDestroyLockFlag(true).setRecreateFlag(false) .setSnapshotInputStream(null).setImageTarget(null) .setIsUsedForSerialGatewaySenderQueue(true).setSerialGatewaySender(sender)); this.sender = sender; }
public ParallelGatewaySenderQueueMetaRegion(String regionName, RegionAttributes attrs, LocalRegion parentRegion, InternalCache cache, AbstractGatewaySender pgSender) { super(regionName, attrs, parentRegion, cache, new InternalRegionArguments().setDestroyLockFlag(true).setRecreateFlag(false) .setSnapshotInputStream(null).setImageTarget(null) .setIsUsedForParallelGatewaySenderQueue(true) .setParallelGatewaySender((AbstractGatewaySender) pgSender)); this.sender = (AbstractGatewaySender) pgSender; }
protected <K, V> Region<K, V> createRegion(final String regionName, final RegionAttributes<K, V> attributes) { // Create InternalRegionArguments to set isUsedForMetaRegion true to suppress xml generation // (among other things) InternalRegionArguments ira = new InternalRegionArguments().setDestroyLockFlag(true).setRecreateFlag(false) .setSnapshotInputStream(null).setImageTarget(null).setIsUsedForMetaRegion(true); // Create the region try { return this.cache.createVMRegion(regionName, attributes, ira); } catch (Exception e) { InternalGemFireError ige = new InternalGemFireError( "unexpected exception"); ige.initCause(e); throw ige; } }
@Override public <K, V> Region<K, V> basicCreateRegion(String name, RegionAttributes<K, V> attrs) throws RegionExistsException, TimeoutException { try { InternalRegionArguments ira = new InternalRegionArguments().setDestroyLockFlag(true) .setRecreateFlag(false).setSnapshotInputStream(null).setImageTarget(null); if (attrs instanceof UserSpecifiedRegionAttributes) { ira.setIndexes(((UserSpecifiedRegionAttributes) attrs).getIndexes()); } return createVMRegion(name, attrs, ira); } catch (IOException | ClassNotFoundException e) { // only if loading snapshot, not here throw new InternalGemFireError( "unexpected exception", e); } }
InternalRegionArguments internalRegionArguments = new InternalRegionArguments() .setDestroyLockFlag(getDestroyLock).setSnapshotInputStream(inputStream) .setImageTarget(imageTarget).setRecreateFlag(true); if (this instanceof BucketRegion) { BucketRegion me = (BucketRegion) this;
private static String createClientMessagesRegion(RegionAttributes attr, InternalCache cache, int capacity, int port) { // generating unique name in VM for ClientMessagesRegion String regionName = generateNameForClientMsgsRegion(port); try { cache.createVMRegion(regionName, attr, new InternalRegionArguments().setDestroyLockFlag(true).setRecreateFlag(false) .setSnapshotInputStream(null).setImageTarget(null).setIsUsedForMetaRegion(true)); } catch (RegionExistsException ree) { InternalGemFireError assErr = new InternalGemFireError("unexpected exception"); assErr.initCause(ree); throw assErr; } catch (IOException e) { // only if loading snapshot, not here InternalGemFireError assErr = new InternalGemFireError("unexpected exception"); assErr.initCause(e); throw assErr; } catch (ClassNotFoundException e) { // only if loading snapshot, not here InternalGemFireError assErr = new InternalGemFireError("unexpected exception"); assErr.initCause(e); throw assErr; } return regionName; }