@Override public InternalDistributedSystem getSystem() { return this.cache.getSystem(); }
@Override public InternalDistributedSystem getSystem() { return this.cache.getSystem(); }
public MemoryAllocator getOffHeapStore() { return this.getSystem().getOffHeapStore(); }
public final MemoryAllocator getOffHeapStore() { return this.getSystem().getOffHeapStore(); }
/** * Constructs a new GFXD distribution advisor. Also sets up this VM's profile * and exchanges it with other VMs. */ private GfxdDistributionAdvisor(DistributionAdvisee advisee, GemFireCacheImpl cache) { super(advisee); this.mapLock = new StoppableReentrantReadWriteLock(false, true, cache.getCancelCriterion()); this.newMemberLock = cache.getSystem().getVMIdAdvisor().getNewMemberLock(); this.serverGroupMap = new HashMap<>(); this.locatorMap = new HashMap<>(); this.thriftServers = new HashMap<>(); this.drdaServerMap = new HashMap<>(); }
/** * Constructs a new GFXD distribution advisor. Also sets up this VM's profile * and exchanges it with other VMs. */ private GfxdDistributionAdvisor(DistributionAdvisee advisee, GemFireCacheImpl cache) { super(advisee); this.mapLock = new StoppableReentrantReadWriteLock(false, true, cache.getCancelCriterion()); this.newMemberLock = cache.getSystem().getVMIdAdvisor().getNewMemberLock(); this.serverGroupMap = new HashMap<String, Map<InternalDistributedMember, VMKind>>(); this.locatorMap = new HashMap<InternalDistributedMember, String>(); this.thriftServers = new HashMap<InternalDistributedMember, Set<HostAddress>>(); this.drdaServerMap = new HashMap<InternalDistributedMember, Set<String>>(); }
/** * Constructs a new GFXD distribution advisor. Also sets up this VM's profile * and exchanges it with other VMs. */ private GfxdDistributionAdvisor(DistributionAdvisee advisee, GemFireCacheImpl cache) { super(advisee); this.mapLock = new StoppableReentrantReadWriteLock(false, true, cache.getCancelCriterion()); this.newMemberLock = cache.getSystem().getVMIdAdvisor().getNewMemberLock(); this.serverGroupMap = new HashMap<String, Map<InternalDistributedMember, VMKind>>(); this.locatorMap = new HashMap<InternalDistributedMember, String>(); this.thriftServers = new HashMap<InternalDistributedMember, Set<HostAddress>>(); this.drdaServerMap = new HashMap<InternalDistributedMember, Set<String>>(); }
public static final TXId newTXId(final GemFireCacheImpl cache) { //final PersistentUUIDAdvisor idAdvisor = cache.getTXIdAdvisor(); final VMIdAdvisor idAdvisor = cache.getSystem().getVMIdAdvisor(); final TXId newId = new TXId(); idAdvisor.newUUID(newId); return newId; }
public void run() { GemFireCacheImpl cacheVM1 = (GemFireCacheImpl) getCache(); final DistributionConfig configVM1 = cacheVM1.getSystem().getConfig(); assertEquals(LogWriterImpl.INFO_LEVEL, configVM1.getLogLevel()); assertEquals(LOG__FILE__SIZE__LIMIT, configVM1.getLogFileSizeLimit()); assertEquals(ARCHIVE__FILE__SIZE__LIMIT, configVM1.getArchiveFileSizeLimit()); assertEquals(ARCHIVE__DISK__SPACE__LIMIT, configVM1.getArchiveDiskSpaceLimit()); assertEquals(STATISTIC__SAMPLE__RATE, configVM1.getStatisticSampleRate()); assertEquals(STATISTIC__ARCHIVE__FILE, configVM1.getStatisticArchiveFile().getName()); assertEquals(STATISTIC__SAMPLING__ENABLED, configVM1.getStatisticSamplingEnabled()); assertEquals(LOG__DISK__SPACE__LIMIT, configVM1.getLogDiskSpaceLimit()); } });
public Set<String> getLocalServerGroups() { Set<String> localServerGroups = new HashSet(); GemFireCacheImpl c = getCache(); List servers = null; servers = c.getCacheServers(); Collections.addAll(localServerGroups, MemberAttributes.parseGroups(null, c.getSystem().getConfig().getGroups())); for (Object object : servers) { CacheServerImpl server = (CacheServerImpl)object; if (server.isRunning() && (server.getExternalAddress() != null)) { Collections.addAll(localServerGroups, server.getGroups()); } } return localServerGroups; } /**
public Set<String> getLocalServerGroups() { Set<String> localServerGroups = new HashSet(); GemFireCacheImpl c = getCache(); List servers = null; servers = c.getCacheServers(); Collections.addAll(localServerGroups, MemberAttributes.parseGroups(null, c.getSystem().getConfig().getGroups())); for (Object object : servers) { BridgeServerImpl server = (BridgeServerImpl)object; if (server.isRunning() && (server.getExternalAddress() != null)) { Collections.addAll(localServerGroups, server.getGroups()); } } return localServerGroups; } /**
Cache trueCache = null; GemFireCacheImpl cache = (GemFireCacheImpl)CacheFactory.getAnyInstance(); DistributionConfig config = cache.getSystem().getConfig(); memberId = cache.getDistributedSystem().getDistributedMember().getId();
private void initializeGateway(GatewayImpl gatewayImpl) { //TODO Dan - make sure that the gateway is already //receiving updates by the time we iterate over the region here. TXStateInterface currentState = suspendTX(); Region<Object, Object> r = getIdToType(); try { for(Map.Entry<Object, Object> typeEntry: r.entrySet()) { EntryEventImpl event = EntryEventImpl.create( (LocalRegion) r, Operation.UPDATE, typeEntry.getKey(), typeEntry.getValue(), new GatewayEventCallbackArgument((Object)null), false, cache.getMyId()); try { event.setEventId(new EventID(cache.getSystem())); gatewayImpl.distribute(EnumListenerEvent.AFTER_UPDATE, event); } finally { event.release(); } } } finally { resumeTX(currentState); } }
internalCache.getSystem().disconnect();
internalCache.getSystem().disconnect();
@Override public void execute(FunctionContext context) { String memberId = ""; try { Object arg = context.getArguments(); GemFireCacheImpl cache = (GemFireCacheImpl)CacheFactory.getAnyInstance(); DistributionConfig config = cache.getSystem().getConfig(); memberId = cache.getDistributedSystem().getDistributedMember().getId(); Map<String, String> runtimeAttributes = (Map<String, String>)arg; Set<String> attributeNames = runtimeAttributes.keySet(); for (String attributeName : attributeNames) { String attValue = runtimeAttributes.get(attributeName); config.setAttribute(attributeName, attValue, ConfigSource.runtime()); } CliFunctionResult cliFuncResult = new CliFunctionResult(memberId, true, null); context.getResultSender().lastResult(cliFuncResult); } catch (CacheClosedException cce) { CliFunctionResult result = new CliFunctionResult(memberId, false, null); context.getResultSender().lastResult(result); } catch (Exception e){ CliFunctionResult cliFuncResult = new CliFunctionResult(memberId, e, null); context.getResultSender().lastResult(cliFuncResult); } }
getSystem(localProps); final GemFireCacheImpl cache = (GemFireCacheImpl) getCache(); final DistributionConfig config = cache.getSystem().getConfig(); CommandStringBuilder csb = new CommandStringBuilder(CliStrings.ALTER_RUNTIME_CONFIG); csb.addOption(CliStrings.ALTER_RUNTIME_CONFIG__MEMBER, controller);
getSystem(localProps); final GemFireCacheImpl cache = (GemFireCacheImpl)getCache(); final DistributionConfig config = cache.getSystem().getConfig();
event.setEventId(new EventID(cache.getSystem())); try { event.setRegion(this);
event.setEventId(new EventID(cache.getSystem())); try { event.setRegion(this);