/** * used for instantiation of a profile associated with a region and not describing region filters * in a different process. Do not use this method when instantiating profiles to store in * distribution advisor profiles. */ public FilterProfile(LocalRegion r) { this(r, r.getMyId(), r.getGemFireCache().getCacheServers().size() > 0); }
@Before public void setUp() { mockRegion = mock(LocalRegion.class); GemFireCacheImpl mockCache = mock(GemFireCacheImpl.class); when(mockCache.getCacheServers()).thenReturn(Collections.emptyList()); when(mockRegion.getGemFireCache()).thenReturn(mockCache); fprofile = new FilterProfile(mockRegion); }
private void scheduleTombstone(RegionEntry entry, VersionTag destroyedVersion, boolean reschedule) { if (destroyedVersion == null) { throw new NullPointerException("destroyed version tag cannot be null"); } if (!reschedule) { incTombstoneCount(1); } if (logger.isTraceEnabled(LogMarker.TOMBSTONE_COUNT_VERBOSE)) { logger.trace(LogMarker.TOMBSTONE_COUNT_VERBOSE, "{} tombstone for {} version={} count is {} entryMap size is {}", reschedule ? "rescheduling" : "scheduling", entry.getKey(), entry.getVersionStamp().asVersionTag(), this.tombstoneCount.get(), this.entries.size()/* , new Exception("stack trace") */); } getGemFireCache().getTombstoneService().scheduleTombstone(this, entry, destroyedVersion); }
QueryService qs = getGemFireCache().getLocalQueryService(); String queryStr = constructRegionQueryString(predicate.trim()); DefaultQuery query = (DefaultQuery) qs.newQuery(queryStr);
@Override public void validateExecution(Function function, Set targetMembers) { InternalCache cache = region.getGemFireCache(); if (cache != null && cache.getTxManager().getTXState() != null) { if (targetMembers.size() > 1) {
if (getDiskStoreName() != null) { DiskStoreImpl diskStore = (DiskStoreImpl) getGemFireCache().findDiskStore(getDiskStoreName()); if (diskStore == null) { throw new IllegalStateException(String.format("Disk store %s not found", return getGemFireCache().getOrCreateDefaultDiskStore(); DiskStoreFactory diskStoreFactory = getGemFireCache().createDiskStoreFactory(); diskStoreFactory.setDiskDirsAndSizes(getDiskDirs(), getDiskDirSizes()); DiskWriteAttributes dwa = getDiskWriteAttributes();
logger.debug("QueryService Index creation process for {}" + icd.getIndexName()); DefaultQueryService qs = (DefaultQueryService) getGemFireCache().getLocalQueryService(); String fromClause = icd.getIndexType() == IndexType.FUNCTIONAL || icd.getIndexType() == IndexType.HASH