private void initDSAndCache() { if (this.distributedSystem == null) { this.distributedSystem = InternalDistributedSystem.getConnectedInstance(); } if (this.cache == null) { this.cache = GemFireCacheImpl.getInstance(); } }
/** * create the cache to be used by this migration server * @throws Exception if there are any problems */ private void createCache() throws Exception { if (this.distributedSystem == null) { this.distributedSystem = InternalDistributedSystem.getConnectedInstance(); } this.cache = CacheFactory.create(this.distributedSystem); }
/** * public constructor */ public MBeanJMXAdapter() { this.localGemFireMBean = new ConcurrentHashMap<ObjectName, Object>(); this.distMember = InternalDistributedSystem.getConnectedInstance() .getDistributedMember(); }
/** * create the cache to be used by this migration server * @throws Exception if there are any problems */ private void createCache() throws Exception { if (this.distributedSystem == null) { this.distributedSystem = InternalDistributedSystem.getConnectedInstance(); } this.cache = CacheFactory.create(this.distributedSystem); }
/** * Gets the ID of the member in the GemFire distributed system as determined and assigned by GemFire when the member * process joins the distributed system. Note, this call only works if the API is used in-process. * * @return a String value indicating the ID of the member in the GemFire distributed system. */ public String getMemberId() { final InternalDistributedSystem distributedSystem = InternalDistributedSystem.getConnectedInstance(); return (distributedSystem != null ? distributedSystem.getMemberId() : null); }
/** * public constructor */ public MBeanJMXAdapter() { this.localGemFireMBean = new ConcurrentHashMap<ObjectName, Object>(); this.distMember = InternalDistributedSystem.getConnectedInstance() .getDistributedMember(); }
private void initDSAndCache() { if (this.distributedSystem == null) { this.distributedSystem = InternalDistributedSystem.getConnectedInstance(); } if (this.cache == null) { this.cache = GemFireCacheImpl.getInstance(); } }
private static int getDSTimeoutSecs() { final InternalDistributedSystem dsys = InternalDistributedSystem .getConnectedInstance(); if (dsys != null) { final int timeoutSecs = dsys.getConfig().getAckWaitThreshold(); if (timeoutSecs > 0) { return timeoutSecs; } return WAIT_INFINITE; } return DS_NOTFOUND; }
@Override public void run2() throws CacheException { try { InternalDistributedSystem system = InternalDistributedSystem.getConnectedInstance(); if (system != null) system.disconnect(); } catch (Exception e) { fail("Stoping vm2 failed", e); } } });
private String getMemberID() { String formattedMemberID = MBeanJMXAdapter.getMemberNameOrId(InternalDistributedSystem .getConnectedInstance().getDistributedMember()); return formattedMemberID; }
/** * Gets the name of the member in the GemFire distributed system as determined by the 'name' GemFire property. * Note, this call only works if the API is used in-process. * * @return a String value indicating the name of the member in the GemFire distributed system. */ public String getMemberName() { final InternalDistributedSystem distributedSystem = InternalDistributedSystem.getConnectedInstance(); return (distributedSystem != null ? distributedSystem.getConfig().getName() : null); }
@Override public void run2() throws CacheException { try { InternalDistributedSystem system = InternalDistributedSystem.getConnectedInstance(); if (system != null) system.disconnect(); } catch (Exception e) { fail("Stoping locator failed", e); } } });
@Override public void run2() throws CacheException { try { InternalDistributedSystem system = InternalDistributedSystem.getConnectedInstance(); if (system != null) system.disconnect(); } catch (Exception e) { fail("Stoping vm1 failed", e); } } });
@Override public void run2() throws CacheException { try { InternalDistributedSystem.getConnectedInstance().disconnect(); } catch (Exception e) { fail("Stoping vm1 failed", e); } } });
/** * Gets the name of the member in the GemFire distributed system as determined by the 'name' GemFire property. * Note, this call only works if the API is used in-process. * * @return a String value indicating the name of the member in the GemFire distributed system. */ public String getMemberName() { final InternalDistributedSystem distributedSystem = InternalDistributedSystem.getConnectedInstance(); return (distributedSystem != null ? distributedSystem.getConfig().getName() : null); }
@Override public void setUp() throws Exception { final InternalDistributedSystem sys = InternalDistributedSystem .getConnectedInstance(); if (sys != null && sys.isConnected()) { sys.disconnect(); } final Properties props = new Properties(); props.setProperty("mcast-port", "0"); // loner this.cache = new CacheFactory(props).create(); }
/** * If we are connected to a distributed system, send a message to * other members telling them about a newly-registered serializer. */ private static void sendRegistrationMessage(DataSerializer s) { InternalDistributedSystem system = InternalDistributedSystem.getConnectedInstance(); if (system != null) { RegistrationMessage m = new RegistrationMessage(s); system.getDistributionManager().putOutgoing(m); } }
public void run() { GMS gms = (GMS)MembershipManagerHelper.getJChannel(InternalDistributedSystem.getConnectedInstance()) .getProtocolStack().findProtocol("GMS"); gms.disableDisconnectOnQuorumLossForTesting(); }} );
public void executeWithNoLastResult(FunctionContext context) { // add expected exception InternalDistributedSystem.getConnectedInstance().getLogWriter().info( "<ExpectedException action=add>did not send last result" + "</ExpectedException>"); context.getResultSender().sendResult((Serializable) context.getArguments()); }
private void initFB() { String pidPrefix = "MEMBERNAME_" + RemoteTestModule.getMyClientName() + RemoteTestModule.getMyVmid(); String formattedMemberID = MBeanJMXAdapter.getMemberNameOrId(InternalDistributedSystem .getConnectedInstance().getDistributedMember()); logInfo("Storing member Name against vmId " + pidPrefix + " memberId " + formattedMemberID); FederationBlackboard.getBB().getSharedMap().put(pidPrefix, formattedMemberID); }