本文整理汇总了Java中org.apache.ignite.configuration.IgniteConfiguration.setMetricsUpdateFrequency方法的典型用法代码示例。如果您正苦于以下问题:Java IgniteConfiguration.setMetricsUpdateFrequency方法的具体用法?Java IgniteConfiguration.setMetricsUpdateFrequency怎么用?Java IgniteConfiguration.setMetricsUpdateFrequency使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.ignite.configuration.IgniteConfiguration
的用法示例。
在下文中一共展示了IgniteConfiguration.setMetricsUpdateFrequency方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi spi = new TcpDiscoverySpi();
spi.setIpFinder(IP_FINDER);
cfg.setDiscoverySpi(spi);
cfg.setCacheConfiguration();
cfg.setMetricsUpdateFrequency(500);
CacheConfiguration<Integer, Object> ccfg = defaultCacheConfiguration();
ccfg.setName(CACHE_NAME);
ccfg.setStatisticsEnabled(true);
FifoEvictionPolicy plc = new FifoEvictionPolicy();
plc.setMaxMemorySize(MAX_VALS_AMOUNT * VAL_SIZE);
plc.setMaxSize(0);
ccfg.setEvictionPolicy(plc);
ccfg.setOnheapCacheEnabled(true);
return cfg.setCacheConfiguration(ccfg);
}
示例2: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration() throws Exception {
IgniteConfiguration cfg = super.getConfiguration();
cfg.setDeploymentSpi(new LocalDeploymentSpi());
cfg.setMetricsUpdateFrequency(500);
cfg.setDeploymentMode(depMode);
return cfg;
}
示例3: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
CacheConfiguration cCfg = defaultCacheConfiguration();
cCfg.setCacheMode(PARTITIONED);
cCfg.setBackups(1);
cCfg.setNearConfiguration(new NearCacheConfiguration());
cCfg.setRebalanceMode(SYNC);
cCfg.setWriteSynchronizationMode(FULL_SYNC);
TcpDiscoverySpi disc = new TcpDiscoverySpi();
if (clientMode && ((igniteInstanceName.charAt(igniteInstanceName.length() - 1) - '0') & 1) != 0)
cfg.setClientMode(true);
else
cfg.setClientFailureDetectionTimeout(50000);
disc.setIpFinder(IP_FINDER);
disc.setAckTimeout(1000);
disc.setSocketTimeout(1000);
cfg.setCacheConfiguration(cCfg);
cfg.setDiscoverySpi(disc);
cfg.setMetricsUpdateFrequency(500);
return cfg;
}
示例4: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setCacheConfiguration();
cfg.setIncludeProperties();
cfg.setMetricsUpdateFrequency(0);
return cfg;
}
示例5: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setPeerClassLoadingEnabled(false);
cfg.setDeploymentMode(depMode);
if (initGar) {
UriDeploymentSpi depSpi = new UriDeploymentSpi();
depSpi.setUriList(Collections.singletonList(garFile));
cfg.setDeploymentSpi(depSpi);
}
cfg.setMetricsUpdateFrequency(500);
return cfg;
}
示例6: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setDeploymentSpi(new LocalDeploymentSpi());
((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
cfg.setMetricsUpdateFrequency(500);
cfg.setDeploymentMode(depMode);
return cfg;
}
示例7: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
cfg.setClientFailureDetectionTimeout(30000);
cfg.setClientMode(client);
cfg.setMetricsUpdateFrequency(1000);
return cfg;
}
示例8: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
cfg.setPeerClassLoadingEnabled(false);
if (applyDiscoveryHook) {
final DiscoveryHook hook = discoveryHook != null ? discoveryHook : new DiscoveryHook();
TcpDiscoverySpi discoSpi = new TcpDiscoverySpi() {
@Override public void setListener(@Nullable DiscoverySpiListener lsnr) {
super.setListener(GridTestUtils.DiscoverySpiListenerWrapper.wrap(lsnr, hook));
}
};
cfg.setDiscoverySpi(discoSpi);
cfg.setMetricsUpdateFrequency(1000);
}
((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
cfg.setMarshaller(new BinaryMarshaller());
cfg.setClientMode(clientMode);
CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setCacheMode(CacheMode.REPLICATED);
cfg.setCacheConfiguration(ccfg);
return cfg;
}
示例9: getConfiguration
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setDeploymentMode(depMode);
cfg.setMetricsUpdateFrequency(500);
((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(FINDER);
cfg.setCacheConfiguration();
return cfg;
}
示例10: systemInitialize
import org.apache.ignite.configuration.IgniteConfiguration; //导入方法依赖的package包/类
/**
* <code>systemInitialize</code> is the entry method to start all the operations within iotracah.
* This class is expected to be extended by the core plugin only.
* If there is more than that implementation then the first implementation with no
* guarantee of selection will be loaded.
* The system will automatically throw a <code>UnRetriableException</code> if no implementation of this
* interface is detected.
*
* @param baseSystemHandlerList
* @throws UnRetriableException
*/
@Override
public void systemInitialize(List<BaseSystemHandler> baseSystemHandlerList) throws UnRetriableException {
//Initiate ignite.
synchronized (this) {
TcpDiscoverySpi spi = new TcpDiscoverySpi();
TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
// Set initial IP addresses.
// Note that you can optionally specify a port or a port range.
ipFinder.setAddresses(Arrays.asList(getDiscoveryAddresses()));
spi.setIpFinder(ipFinder);
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setGridName(getExecutorDefaultName());
// Override default discovery SPI.
cfg.setDiscoverySpi(spi);
//Set node attribute.
Map<String, String> attributes = new HashMap<>();
attributes.put("ROLE", getExecutorDefaultName());
cfg.setUserAttributes(attributes);
//Use sl4j logger
IgniteLogger gridLog = new Slf4jLogger(LoggerFactory.getLogger("org.apache.ignite")); // Provide correct SLF4J logger here.
cfg.setGridLogger(gridLog);
//Optimize marshaller
OptimizedMarshaller optimizedMarshaller = new OptimizedMarshaller();
optimizedMarshaller.setRequireSerializable(true);
cfg.setMarshaller(optimizedMarshaller);
TransactionConfiguration transactionConfiguration = new TransactionConfiguration();
transactionConfiguration.setDefaultTxConcurrency(TransactionConcurrency.PESSIMISTIC);
transactionConfiguration.setDefaultTxIsolation(TransactionIsolation.READ_COMMITTED);
transactionConfiguration.setDefaultTxTimeout(30000);
cfg.setTransactionConfiguration(transactionConfiguration);
cfg.setMetricsLogFrequency(0);
cfg.setMetricsUpdateFrequency(15000);
Ignition.start(cfg);
//Also instantiate the server router.
IgniteMessaging igniteMessaging = getIgnite().message();
String cluster = getExecutorDefaultName();
UUID nodeId = getNodeId();
DefaultServerRouter defaultServerRouter = new DefaultServerRouter(cluster, nodeId, igniteMessaging);
defaultServerRouter.initiate();
this.serverRouter = defaultServerRouter;
}
log.debug(" systemInitialize : performing classifications for base system handlers");
baseSystemHandlerList.forEach(this::classifyBaseHandler);
}