/** * Returns the member id of my distributed system * * @since 5.0 */ @Override protected final InternalDistributedMember getMyId() { return this.cache.getMyId(); }
/** * @return the set of members which are known to be critical */ public Set<DistributedMember> getMemoryThresholdReachedMembers() { return Collections.<DistributedMember> singleton(this.cache.getMyId()); }
/** * @return the set of members which are known to be critical */ public Set<DistributedMember> getMemoryThresholdReachedMembers() { return Collections.<DistributedMember> singleton(this.cache.getMyId()); }
private void setMyId() { final GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); if (cache != null) { this.origin = cache.getMyId(); } }
public Object call() throws Exception { return ((GemFireCacheImpl)getCache()).getMyId(); } };
public Object call() throws Exception { return ((GemFireCacheImpl)getCache()).getMyId(); } });
public Object call() { return TestRegion.getCache().getMyId(); } });
public static LowMemoryException lowMemoryException(GemFireCacheImpl cache, long size) { if (cache == null) { cache = GemFireCacheImpl.getInstance(); } Set<DistributedMember> sm = cache != null ? Collections.singleton(cache.getMyId()) : Collections.emptySet(); return new LowMemoryException("Could not obtain memory of size " + size, sm); }
public void execute(FunctionContext context) { // first send some results for (int index = 0; index < 5; ++index) { context.getResultSender().sendResult(Integer.valueOf(index)); } // then throw an exception throw new NullPointerException("simulated exception with myId: " + GemFireCacheImpl.getInstance().getMyId()); }
private static String getMyIdString() { try { return Misc.getGemFireCache().getMyId().toString(); } catch (CacheClosedException ex) { return "going down!"; } } }
public String getColumnCompressionCodec() { String codec = this.columnCompressionCodec; if (codec == null && !cache.isUnInitializedMember(cache.getMyId())) { initFromHiveMetaData(); return this.columnCompressionCodec; } return codec; }
private static String getMyIdString() { try { return Misc.getGemFireCache().getMyId().toString(); } catch (CacheClosedException ex) { return "going down!"; } } }
AbstractDBSynchronizerMessage(LocalRegion rgn) { final GemFireCacheImpl cache = rgn.getCache(); final EventID eventId = new EventID(cache.getDistributedSystem()); final DistributedMember member = cache.getMyId(); this.initializeEvent(rgn, eventId, member); // this.remoteDistribution = remoteDistribution; this.rgn = rgn; }
AbstractDBSynchronizerMessage(LocalRegion rgn) { final GemFireCacheImpl cache = rgn.getCache(); final EventID eventId = new EventID(cache.getDistributedSystem()); final DistributedMember member = cache.getMyId(); this.initializeEvent(rgn, eventId, member); // this.remoteDistribution = remoteDistribution; this.rgn = rgn; }
public static Map<DistributedMember, DistributionConfig> verifyConfigData() { GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); ManagementService service = getManagementService(); DistributionConfig config = ((InternalDistributedSystem) cache .getDistributedSystem()).getConfig(); MemberMXBean bean = service.getMemberMXBean(); GemFireProperties data = bean.listGemFireProperties(); assertEquals(config, data); Map<DistributedMember, DistributionConfig> configMap = new HashMap<DistributedMember, DistributionConfig>(); configMap.put(cache.getMyId(), config); return configMap; }
@Override public Serializable getRoutingObject(EntryOperation opDetails) { count.incrementAndGet(); opDetails.getRegion().getCache().getLoggerI18n().fine("Resolver called key:" +opDetails.getKey()+" Region "+opDetails.getRegion().getName()+" id:"+ ((GemFireCacheImpl)opDetails.getRegion().getCache()).getMyId(), new Throwable()); return super.getRoutingObject(opDetails); } public static void resetResolverCount() {
private HDFSGatewayEventImpl getNewEvent(Object key, Object value, long seq) throws Exception { EntryEventImpl evt = EntryEventImpl.create(region, Operation.CREATE, key, value, null, false, (DistributedMember) cache.getMyId()); evt.setEventId(new EventID(cache.getDistributedSystem())); HDFSGatewayEventImpl event = new HDFSGatewayEventImpl(EnumListenerEvent.AFTER_CREATE, evt, true, 0, true); event.setShadowKey(seq); return event; } }
private HDFSGatewayEventImpl getNewEvent(Object key, Object value, Region r1, int bid, int tailKey) throws Exception { EntryEventImpl ev1 = EntryEventImpl.create((LocalRegion)r1, Operation.CREATE, key, value, null, false, (DistributedMember)c.getMyId()); ev1.setEventId(new EventID(this.c.getDistributedSystem())); HDFSGatewayEventImpl event = null; event = new HDFSGatewayEventImpl(EnumListenerEvent.AFTER_CREATE, ev1, true, bid, true); event.setShadowKey((long)tailKey); return event; }
public static void goCritical(GemFireCacheImpl cache) { InternalResourceManager irm = (InternalResourceManager)cache.getResourceManager(); getTestInstance().inspector.expectLowMemoryException(true, cache.getMyId()); if (isOffHeap()) { irm.getOffHeapMonitor().updateStateAndSendEvent(950); } else { irm.getHeapMonitor().updateStateAndSendEvent(950); } Log.getLogWriter().info("ThresholdsTest: Artifically moved into Critical State"); }
public static void goBelowEviction(GemFireCacheImpl cache) { InternalResourceManager irm = cache. getResourceManager(); getTestInstance().inspector.expectLowMemoryException(false, cache.getMyId()); if (isOffHeap()) { irm.getOffHeapMonitor().updateStateAndSendEvent(750); } else { irm.getHeapMonitor().updateStateAndSendEvent(750); } Log.getLogWriter().info("ThresholdsTest: Moved from Artifical Critical to below eviction threshold"); }