@Override public boolean isDurableClient() { boolean isDurable = false; DistributionConfig config = dsys.getConfig(); String durableClientId = config.getDurableClientId(); isDurable = durableClientId != null && durableClientId.length() > 0; return isDurable; }
/** * Return the time in sec to wait before sending an alert while waiting for ack replies. Note that * the ack wait threshold may change at runtime, so we have to consult the system every time. */ protected int getAckWaitThreshold() { return this.system.getConfig().getAckWaitThreshold(); }
@Override public DistributionConfig getConfig() { DistributionConfig result = null; InternalDistributedSystem sys = getSystem(); if (sys != null) { result = system.getConfig(); } return result; }
/** * Return the time in sec to wait before removing unresponsive members from the distributed * system. This period starts after the ack-wait-threshold period has elapsed */ protected int getSevereAlertThreshold() { return this.system.getConfig().getAckSevereAlertThreshold(); }
@Override public File getArchiveFileName() { return this.con.getConfig().getStatisticArchiveFile(); }
@Override protected int getSampleRate() { return this.con.getConfig().getStatisticSampleRate(); }
@Override public long getArchiveDiskSpaceLimit() { if (fileSizeLimitInKB()) { // use KB instead of MB to speed up removal for testing return ((long) this.con.getConfig().getArchiveDiskSpaceLimit()) * (1024); } else { return ((long) this.con.getConfig().getArchiveDiskSpaceLimit()) * (1024 * 1024); } }
private void stopMemcachedServer() { if (this.memcachedServer != null) { logger.info("GemFireMemcachedServer on port {} is shutting down", new Object[] {this.system.getConfig().getMemcachedPort()}); this.memcachedServer.shutdown(); } }
/** * 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 DistributionConfig getConfig() { DistributionConfig result = null; if (getSystem() != null) { result = getSystem().getConfig(); } return result; }
/** * Helper method to get GemFire set socket buffer size, possibly a default of 32k * * @return Buffer size to use for server */ private int getBufferSize() { InternalDistributedSystem system = (InternalDistributedSystem) cache.getDistributedSystem(); return system.getConfig().getSocketBufferSize(); }
@Override public int getDistributedSystemId() { return getSystem().getConfig().getDistributedSystemId(); }
private int getSocketBufferSize() { InternalDistributedSystem system = (InternalDistributedSystem) cache.getDistributedSystem(); return system.getConfig().getSocketBufferSize(); }
/** * Redirects the standard out and standard err to the configured log file as specified in the * GemFire distributed system properties. * * @param distributedSystem the GemFire model for a distributed system. * @throws IOException if the standard out and err redirection was unsuccessful. */ protected void redirectOutput(final DistributedSystem distributedSystem) throws IOException { if (distributedSystem instanceof InternalDistributedSystem) { OSProcess .redirectOutput(((InternalDistributedSystem) distributedSystem).getConfig().getLogFile()); } }
@Override public void reLoadClusterConfiguration() throws IOException, ClassNotFoundException { this.configurationResponse = requestSharedConfiguration(); if (this.configurationResponse != null) { ccLoader.deployJarsReceivedFromClusterConfiguration(this.configurationResponse); ccLoader.applyClusterPropertiesConfiguration(this.configurationResponse, this.system.getConfig()); ccLoader.applyClusterXmlConfiguration(this, this.configurationResponse, this.system.getConfig().getGroups()); initializeDeclarativeCache(); } }
/** * wait for the current operations being sent on views prior to the joining of the given member * to be placed on communication channels before returning * * @since GemFire 5.1 */ void waitForCurrentOperations() { long timeout = 1000L * distributionAdvisor.getDistributionManager().getSystem().getConfig() .getAckWaitThreshold(); waitForCurrentOperations(logger, timeout, timeout * 2L); }
void applyJarAndXmlFromClusterConfig() { if (this.configurationResponse == null) { // Deploy all the jars from the deploy working dir. ClassPathLoader.getLatest().getJarDeployer().loadPreviouslyDeployedJarsFromDisk(); } ccLoader.applyClusterXmlConfiguration(this, this.configurationResponse, this.system.getConfig().getGroups()); }