public MirrorType getMirrorType() { if (this.dataPolicy.isNormal() || this.dataPolicy.isPreloaded() || this.dataPolicy.isEmpty() || this.dataPolicy.withPartitioning()) { return MirrorType.NONE; } else if (this.dataPolicy.withReplication()) { return MirrorType.KEYS_VALUES; } else { throw new IllegalStateException(LocalizedStrings.RegionAttributesCreation_NO_MIRROR_TYPE_CORRESPONDS_TO_DATA_POLICY_0.toLocalizedString(this.dataPolicy)); } }
public boolean include(Profile profile) { // probably not needed as all profiles for a partitioned region are Partition profiles if (profile instanceof PartitionProfile) { PartitionProfile p = (PartitionProfile)profile; return p.isDataStore && (!p.dataPolicy.withPersistence() || p.regionInitialized); } return false; } });
private static boolean isPartitioned(DataPolicy policy) { return policy != null && policy.toString().contains(PARTITION); }
public boolean include(Profile profile) { assert profile instanceof CacheProfile; CacheProfile cp = (CacheProfile)profile; DataPolicy dp = cp.dataPolicy; return dp.withReplication() || (cp.allEvents() && (dp.withStorage() || cp.hasCacheListener)); } });
void checkEntryTimeoutAction(String mode, ExpirationAction ea) { if ((this.dataPolicy.withReplication() || this.dataPolicy.withPartitioning()) && (ea == ExpirationAction.LOCAL_DESTROY || ea == ExpirationAction.LOCAL_INVALIDATE)) { throw new IllegalArgumentException(LocalizedStrings.AbstractRegion_0_ACTION_IS_INCOMPATIBLE_WITH_THIS_REGIONS_DATA_POLICY.toLocalizedString(mode)); } }
&& (rgn.getDataPolicy().withReplication() || rgn.getDataPolicy() .withPreloaded())) { if (logger.isDebugEnabled()) { logger.trace(LogMarker.DM_BRIDGE_SERVER, "Ignoring possible duplicate event");
if (policy.withPartitioning()) { final PartitionedRegion pregion = (PartitionedRegion)this.region; RetryTimeKeeper retryTime = null; replicates = dreg.getCacheDistributionAdvisor() .adviseInitializedReplicates(); if (policy.withReplication() || policy.withPreloaded()) { if (replicates.size() == 0) { replicates = new THashSet(2); else if (policy.withReplication() || policy.withPreloaded()) { member = myId; else if (!policy.withStorage()) { if (this.failedNodes == null) { member = dreg.getRandomReplicate();
if (dataPolicy.withPersistence()) { targetProvider = new CreatePersistentRegionProcessor(this, getPersistenceAdvisor(), recoverFromDisk); if (dataPolicy.withPersistence()) { recovered_rvv = (this.getVersionVector()==null?null:this.getVersionVector().getCloneForTransmission()); boolean attemptGetFromOne = || this.dataPolicy.withPreloaded() if (this.dataPolicy.isPreloaded()) { GIIStatus ret_preload = iiop.getFromOne(advice.preloaded, false, advice, recoverFromDisk, recovered_rvv); if (GIIStatus.didGII(ret_preload)) {
public static <K, V> PartitionedRegionBridge<K, V> getInstance(Region<K, V> region) { if (region.getAttributes().getDataPolicy().withHDFS()) { PartitionedRegionBridge<K, V> bridge = new HDFSRegionBridge<K, V>(region); return bridge; } else { return new PartitionedRegionBridge<K, V> (region); } }
/** * Returns true if table is partitioned. */ public final boolean isPartitioned() { return this.regionAttributes.getDataPolicy().withPartitioning(); }
/** * Can this table contain any data locally? */ public final boolean isDataStore() { return this.region != null && this.region.getDataPolicy().withStorage() && (!this.region.getDataPolicy().withPartitioning() || this.region .getPartitionAttributes().getLocalMaxMemory() != 0); }
if (this.dataPolicy.withReplication()) { s |= REPLICATE_MASK; if (this.dataPolicy.isPersistentReplicate()) { s |= PERSISTENT_MASK; if (this.dataPolicy.isEmpty()) s |= PROXY_MASK; if (this.dataPolicy.isPreloaded()) s |= PRELOADED_MASK;
.getCacheDistributionAdvisor(); Set<InternalDistributedMember> replicates = null; if (policy.withReplication() || policy.withPreloaded()) { member = myId; else if (!policy.withStorage()) { if (this.failedNodes == null) { member = this.dr.getRandomReplicate();
protected static boolean isRemoteAccessor(CacheProfile profile) { if (!profile.dataPolicy.withStorage()) { return true; } if (profile.isPartitioned) { PartitionProfile prProfile = (PartitionProfile) profile; if (prProfile.localMaxMemory == 0) { return true; } } return false; }
/** local regions do not perform versioning */ protected boolean shouldGenerateVersionTag(RegionEntry entry, EntryEventImpl event) { if (this.getDataPolicy().withPersistence()) { return true; } else { return this.concurrencyChecksEnabled && (entry.getVersionStamp().hasValidVersion() || this.dataPolicy.withReplication()); } }
public boolean include(Profile profile) { assert profile instanceof CacheProfile; CacheProfile cp = (CacheProfile)profile; if (cp.dataPolicy.withReplication() && cp.regionInitialized && !cp.memberUnInitialized) { return true; } return false; } });
this.persistBackup = attr.getDataPolicy().isPersistentReplicate(); if (attr.getDataPolicy().withPersistence()) { isReplicated = true;
if (getRegionAttributes().getDataPolicy().withReplication() || getRegionAttributes().getDataPolicy().isPreloaded() || getRegionAttributes().getPartitionAttributes() != null)
public boolean getPersistBackup() { return getDataPolicy().isPersistentReplicate(); }
public boolean include(Profile profile) { assert profile instanceof CacheProfile; CacheProfile cp = (CacheProfile)profile; if (cp.dataPolicy.isEmpty()) { return true; } return false; } });