com.hazelcast.config.Config.findCacheEventJournalConfig()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(87)

本文整理了Java中com.hazelcast.config.Config.findCacheEventJournalConfig()方法的一些代码示例,展示了Config.findCacheEventJournalConfig()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Config.findCacheEventJournalConfig()方法的具体详情如下:
包路径:com.hazelcast.config.Config
类名称:Config
方法名:findCacheEventJournalConfig

Config.findCacheEventJournalConfig介绍

[英]Returns a read-only cache EventJournalconfiguration for the given name.

The name is matched by pattern to the configuration and by stripping the partition ID qualifier from the given name. If there is no config found by the name, it will return the configuration with the name default.
[中]返回给定名称的只读缓存EventJournalconfiguration。
该名称通过模式与配置匹配,并从给定名称中剥离分区ID限定符。如果没有通过名称找到配置,它将返回名为default的配置。

代码示例

代码示例来源:origin: hazelcast/hazelcast-jet

/**
 * {@inheritDoc}
 *
 * @throws CacheNotExistsException if the cache configuration was not found
 */
@Override
public EventJournalConfig getEventJournalConfig(ObjectNamespace namespace) {
  String name = namespace.getObjectName();
  CacheConfig cacheConfig = getCacheService().getCacheConfig(name);
  if (cacheConfig == null) {
    throw new CacheNotExistsException("Cache " + name + " is already destroyed or not created yet, on "
        + nodeEngine.getLocalMember());
  }
  String cacheSimpleName = cacheConfig.getName();
  EventJournalConfig config = nodeEngine.getConfig().findCacheEventJournalConfig(cacheSimpleName);
  if (config == null || !config.isEnabled()) {
    return null;
  }
  return config;
}

代码示例来源:origin: com.hazelcast/hazelcast-all

/**
 * {@inheritDoc}
 *
 * @throws CacheNotExistsException if the cache configuration was not found
 */
@Override
public EventJournalConfig getEventJournalConfig(ObjectNamespace namespace) {
  String name = namespace.getObjectName();
  CacheConfig cacheConfig = getCacheService().getCacheConfig(name);
  if (cacheConfig == null) {
    throw new CacheNotExistsException("Cache " + name + " is already destroyed or not created yet, on "
        + nodeEngine.getLocalMember());
  }
  String cacheSimpleName = cacheConfig.getName();
  EventJournalConfig config = nodeEngine.getConfig().findCacheEventJournalConfig(cacheSimpleName);
  if (config == null || !config.isEnabled()) {
    return null;
  }
  return config;
}

代码示例来源:origin: hazelcast/hazelcast-jet

+ nodeEngine.getLocalMember());
this.eventJournalConfig = nodeEngine.getConfig().findCacheEventJournalConfig(cacheConfig.getName());
this.evictionConfig = cacheConfig.getEvictionConfig();
if (evictionConfig == null) {

代码示例来源:origin: com.hazelcast/hazelcast-all

+ nodeEngine.getLocalMember());
this.eventJournalConfig = nodeEngine.getConfig().findCacheEventJournalConfig(cacheConfig.getName());
this.evictionConfig = cacheConfig.getEvictionConfig();
if (evictionConfig == null) {

相关文章

微信公众号

最新文章

更多

Config类方法