public Cache getReconnectedCache() { Cache c = GemFireCacheImpl.getInstance(); if (c == this) { c = null; } return c; }
public static void setLowMemory(boolean lowMemory, long usedBytes) { if (GemFireCacheImpl.getInstance() != null && !GemFireCacheImpl.getInstance().isQueryMonitorDisabledForLowMemory()) { QueryMonitor.LOW_MEMORY_USED_BYTES = usedBytes; QueryMonitor.LOW_MEMORY = lowMemory; } }
private LocalRegion findRegion() { GemFireCacheImpl cache = null; try { cache = GemFireCacheImpl.getInstance(); if (cache != null) { return cache.getRegionByPathForProcessing(regionName); } } catch (CancelException e) { // nothing to do } return null; }
private void initDSAndCache() { if (this.distributedSystem == null) { this.distributedSystem = InternalDistributedSystem.getConnectedInstance(); } if (this.cache == null) { this.cache = GemFireCacheImpl.getInstance(); } }
public LocalRegion getRegion() { // The region will be null mostly for the other node where the gateway event // is serialized final GemFireCacheImpl cache; return this._region != null ? this._region : (this._region = ((cache = GemFireCacheImpl.getInstance()) != null ? (LocalRegion)cache.getRegion(this._regionName) : null)); }
public LocatorMBeanBridge(Locator loc) { this.loc = loc; this.system = (InternalDistributedSystem) loc.getDistributedSystem(); this.cache = GemFireCacheImpl.getInstance(); }
private LocalRegion findRegion() { GemFireCacheImpl cache = null; try { cache = GemFireCacheImpl.getInstance(); if (cache != null) { return cache.getRegionByPathForProcessing(regionName); } } catch (CancelException e) { // nothing to do } return null; }
/** * check to see if the cache is closing */ final public boolean checkCacheClosing(DistributionManager dm) { GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); // return (cache != null && cache.isClosed()); return cache == null || cache.isClosed(); }
public boolean done() { GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); bean = service.getMBeanProxy(queueMBeanName, AsyncEventQueueMXBean.class); boolean done = (bean != null); return done; }
private static List<DiskStoreImpl> listDiskStores(boolean includeDataDictionary) { List<DiskStoreImpl> diskStoresList = new ArrayList<DiskStoreImpl>(); GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); Collection<DiskStoreImpl> diskStores = cache.listDiskStoresIncludingRegionOwned(); for (DiskStoreImpl diskStore : diskStores) { if (!diskStore.getName().equals(GfxdConstants.GFXD_DD_DISKSTORE_NAME) || includeDataDictionary) { diskStoresList.add(diskStore); } } return diskStoresList; }
@Override public void processMessage(Object[] params, DistributedMember sender) { Boolean flag = (Boolean)params[0]; SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_SYS_PROCEDURES, "GfxdSystemProcedureMessage: Setting Gateway FK Checks to " + flag.booleanValue()); final GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); if(cache != null) { cache.setSkipFKChecksForGatewayEvents(!flag.booleanValue()); } }
/** * check to see if the cache is closing */ final public boolean checkCacheClosing(DistributionManager dm) { GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); return (cache == null || cache.getCancelCriterion().cancelInProgress() != null); }
private void cleanupTransasction(TXStateProxy tx) { if (this.txUniqId != TXManagerImpl.NOTX) { GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); if(cache==null) { // ignore and return, we are shutting down! return; } TXManagerImpl mgr = cache.getTXMgr(); mgr.unmasquerade(tx); } }
@Override public boolean cancel() { GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); if (cache != null && !cache.isClosed()) { suspendCacheTimeMillis(false); } return super.cancel(); } }
@Override public int hashCode(){ GemFireCacheImpl.getInstance().getLoggerI18n().fine("In TestObject.hashCode() : " + this.id); return this.id; }
private void cleanupTransaction(final TXManagerImpl.TXContext context, final DistributionManager dm) { if (getTXId() != null) { final GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); if (cache == null) { // ignore and return, we are shutting down! return; } TXManagerImpl mgr = cache.getTxManager(); mgr.unmasquerade(context, true); } }
@SuppressWarnings("unchecked") @CliCommand (value = CliStrings.STATUS_SHARED_CONFIG, help = CliStrings.STATUS_SHARED_CONFIG_HELP) @CliMetaData (relatedTopic = CliStrings.TOPIC_GEMFIRE_LOCATOR) public Result statusSharedConfiguration() { final GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); final Set<DistributedMember> locators = new HashSet<DistributedMember>(cache.getDistributionManager().getAllHostedLocatorsWithSharedConfiguration().keySet()); if (locators.isEmpty()) { return ResultBuilder.createInfoResult(CliStrings.NO_LOCATORS_WITH_SHARED_CONFIG); } else { return ResultBuilder.buildResult(getSharedConfigurationStatus(locators)); } }
@Override protected AdminResponse createResponse(DistributionManager dm) { GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); HashSet<PersistentID> persistentIds; if(cache != null) { Collection<DiskStoreImpl> diskStores = cache.listDiskStoresIncludingRegionOwned(); for(DiskStoreImpl store : diskStores) { store.flush(); } } return new FlushToDiskResponse(this.getSender()); }
public void startBeingManagingNode() { Cache existingCache = GemFireCacheImpl.getInstance(); if (existingCache != null && !existingCache.isClosed()) { managementService = ManagementService.getManagementService(existingCache); SystemManagementService service = (SystemManagementService) managementService; service.createManager(); service.startManager(); } }
public Object call() throws Exception { GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); ManagementService service = getManagementService(); DistributedSystemMXBean bean = service.getDistributedSystemMXBean(); assertNotNull(bean); bean.changeAlertLevel(alertLevel); return null; } });