public void closeAnyPollutedCache() { if (GemFireCacheImpl.getInstance() != null) { GemFireCacheImpl.getInstance().close(); } }
@Override public Cache getReconnectedCache() { GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); if (cache == this || cache != null && !cache.isInitialized()) { cache = null; } return cache; }
@Override public boolean done() { GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); bean = service.getMBeanProxy(queueMBeanName, AsyncEventQueueMXBean.class); boolean done = (bean != null); return done; }
@Override public boolean done() { GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); bean = service.getMBeanProxy(locatorMBeanName, LocatorMXBean.class); boolean done = (bean != null); return done; }
private static void verifyExportLogsRegionWasDestroyed() { Cache cache = GemFireCacheImpl.getInstance(); assertThat(cache.getRegion(ExportLogsFunction.EXPORT_LOGS_REGION)).isNull(); }
private void cleanupTransaction(TXStateProxy tx) { if (this.txUniqId != TXManagerImpl.NOTX) { InternalCache cache = GemFireCacheImpl.getInstance(); if (cache == null) { // ignore and return, we are shutting down! return; } TXManagerImpl mgr = cache.getTXMgr(); mgr.unmasquerade(tx); } }
public static EventID generateEventId() { InternalCache cache = GemFireCacheImpl.getInstance(); if (cache == null) { // A cache has not yet created return null; } return new EventID(InternalDistributedSystem.getAnyInstance()); }
/** * Sets the EventID to the instantiator if distributed system is created */ public static EventID generateEventId() { InternalCache cache = GemFireCacheImpl.getInstance(); if (cache == null) { // A cache has not yet created return null; } return new EventID(InternalDistributedSystem.getAnyInstance()); }
@Override public boolean done() { GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); bean = service.getDistributedRegionMXBean(regionName); boolean done = (bean != null && bean.getMemberCount() == expectedMembers); return done; }
@Override public boolean cancel() { InternalCache cache = GemFireCacheImpl.getInstance(); if (cache != null && !cache.isClosed()) { suspendCacheTimeMillis(false); } return super.cancel(); } }
@Override public Object call() { InternalCache cache = GemFireCacheImpl.getInstance(); return cache.getDistributedSystem().getDistributedMember(); } };
@Override public boolean done() { GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); bean = service.getDistributedLockServiceMXBean(lockServiceName); boolean done = (bean != null && bean.getMemberCount() == expectedMembers); return done; }
private void cleanupTransaction(TXStateProxy tx) { if (this.txUniqId != TXManagerImpl.NOTX) { InternalCache cache = GemFireCacheImpl.getInstance(); if (cache == null) { // ignore and return, we are shutting down! return; } TXManagerImpl mgr = cache.getTXMgr(); mgr.unmasquerade(tx); } }
@Override public boolean waitUntilReconnected(long time, TimeUnit units) throws InterruptedException { boolean systemReconnected = this.system.waitUntilReconnected(time, units); if (!systemReconnected) { return false; } GemFireCacheImpl cache = getInstance(); return cache != null && cache.isInitialized(); }
private void startGemFire() { this.cache = GemFireCacheImpl.getInstance(); if (this.cache == null) { CacheFactory cacheFactory = new CacheFactory(); this.cache = cacheFactory.create(); } logger = this.cache.getLogger(); }
public static PersistentID compactDiskStore(String diskStoreName) { PersistentID persistentID = null; InternalCache cache = GemFireCacheImpl.getInstance(); if (cache != null && !cache.isClosed()) { DiskStoreImpl diskStore = (DiskStoreImpl) cache.findDiskStore(diskStoreName); if (diskStore != null && diskStore.forceCompaction()) { persistentID = diskStore.getPersistentID(); } } return persistentID; }
protected String getMemberId(final VM vm) { return vm.invoke("getMemberId", () -> { InternalCache cache = GemFireCacheImpl.getInstance(); return cache.getDistributedSystem().getDistributedMember().getId(); }); }
protected void closeCache(final VM vm) { vm.invoke("Close Cache", () -> { InternalCache existingInstance = GemFireCacheImpl.getInstance(); if (existingInstance != null) { existingInstance.close(); } InternalDistributedSystem ds = InternalDistributedSystem.getConnectedInstance(); if (ds != null) { ds.disconnect(); } }); }
/** * Creates a Local region */ protected void createLocalRegion(final VM vm, final String localRegionName) { vm.invoke("Create Local region", () -> { InternalCache cache = GemFireCacheImpl.getInstance(); SystemManagementService service = (SystemManagementService) getManagementService(); RegionFactory factory = cache.createRegionFactory(RegionShortcut.LOCAL); factory.create(localRegionName); }); }
@Override public void validateExecution(Function function, Set targetMembers) { InternalCache cache = GemFireCacheImpl.getInstance(); if (cache != null && cache.getTxManager().getTXState() != null) { TXStateProxyImpl tx = (TXStateProxyImpl) cache.getTxManager().getTXState(); tx.getRealDeal(null, region); tx.incOperationCount(); } }