当前位置: 首页>>代码示例>>Java>>正文


Java ConfigurationChangedEvent类代码示例

本文整理汇总了Java中org.apache.marmotta.platform.core.events.ConfigurationChangedEvent的典型用法代码示例。如果您正苦于以下问题:Java ConfigurationChangedEvent类的具体用法?Java ConfigurationChangedEvent怎么用?Java ConfigurationChangedEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ConfigurationChangedEvent类属于org.apache.marmotta.platform.core.events包,在下文中一共展示了ConfigurationChangedEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configurationChanged

import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent; //导入依赖的package包/类
public void configurationChanged(@Observes ConfigurationChangedEvent e) {
    log.info("configuration changed: {}", e.getKeys());
    if(e.containsChangedKey(KiWiOptions.SPARQL_STRATEGY) ||
            e.containsChangedKey(KiWiOptions.DATACENTER_ID) ||
            e.containsChangedKey(KiWiOptions.CONTEXTS_DEFAULT) ||
            e.containsChangedKey(KiWiOptions.CONTEXTS_INFERRED) ||
            e.containsChangedKey(KiWiOptions.FULLTEXT_ENABLED) ||
            e.containsChangedKey(KiWiOptions.FULLTEXT_LANGUAGES) ||
            e.containsChangedKey(KiWiOptions.DEBUG_SLOWQUERIES) ||
            e.containsChangedKey(KiWiOptions.CLUSTERING_ENABLED) ||
            e.containsChangedKey(KiWiOptions.CACHING_LITERAL_SIZE) ||
            e.containsChangedKey(KiWiOptions.CACHING_TRIPLE_SIZE) ||
            e.containsChangedKey(KiWiOptions.CACHING_URI_SIZE) ||
            e.containsChangedKey(KiWiOptions.CACHING_BNODE_SIZE) ||
            e.containsChangedKey(KiWiOptions.CACHING_QUERY_ENABLED) ||
            e.containsChangedKey(KiWiOptions.CLUSTERING_BACKEND) ||
            e.containsChangedKey(KiWiOptions.CLUSTERING_ADDRESS) ||
            e.containsChangedKey(KiWiOptions.CLUSTERING_PORT) ||
            e.containsChangedKey(KiWiOptions.CLUSTERING_MODE)
            ) {
        log.info("KiWi backend configuration changed, re-initialising triple store");

        sesameService.restart();
    }
}
 
开发者ID:apache,项目名称:marmotta,代码行数:26,代码来源:KiWiStoreProvider.java

示例2: run

import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent; //导入依赖的package包/类
@Override
public void run() {
    eventLock.lock();
    try {
        Set<String> keys = eventBacklog;
        eventBacklog = null;

        if(log.isDebugEnabled()) {
            log.debug("firing delayed ({}ms) configuration changed event with keys [{}]",EVENT_DELAY, StringUtils.join(keys,", "));
        }

        configurationEvent.fire(new ConfigurationChangedEvent(keys));
    } finally {
        eventLock.unlock();
    }
}
 
开发者ID:apache,项目名称:marmotta,代码行数:17,代码来源:ConfigurationServiceImpl.java

示例3: configurationChangedEvent

import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent; //导入依赖的package包/类
/**
 * React to a change in the security configuration, e.g. when the profile is changed.
 * @param event
 */
public void configurationChangedEvent(@Observes ConfigurationChangedEvent event) {
    if (profileLoading) return;

    boolean load = false, init = false;
    for (String key : event.getKeys()) {
        if ("security.profile".equals(key)) {
            load = true;
        } else if (key.startsWith("security")) {
            init = true;
        }
    }

    if (load) {
        loadSecurityProfile(configurationService.getStringConfiguration("security.profile"));
    }
    if (init) {
        log.info("Access Control Filter reloading. Access control is {}.",configurationService.getBooleanConfiguration("security.enabled",true)?"enabled":"disabled");
        initSecurityConstraints();
    }
}
 
开发者ID:apache,项目名称:marmotta,代码行数:25,代码来源:SecurityServiceImpl.java

示例4: onConfigurationChange

import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent; //导入依赖的package包/类
protected void onConfigurationChange(@Observes ConfigurationChangedEvent event) {
    for (String changedKey : event.getKeys()) {
        if (changedKey.startsWith(CONFIGURATION_PREFIX + ".")) {
            String prefix = changedKey.substring(CONFIGURATION_PREFIX.length() + 1);
            String namespace = configurationService.getStringConfiguration(changedKey);
            cache.put(prefix, namespace);
        }
    }
}
 
开发者ID:apache,项目名称:marmotta,代码行数:10,代码来源:PrefixServiceImpl.java

示例5: configurationEventHandler

import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent; //导入依赖的package包/类
public void configurationEventHandler(@Observes ConfigurationChangedEvent event) {
    if(!isTestEnvironment()) {
        if (event.containsChangedKeyWithPrefix("logging.")) {
            log.warn("LOGGING: Reloading logging configuration");
            configureLoggers();
        }
    }
}
 
开发者ID:apache,项目名称:marmotta,代码行数:9,代码来源:LoggingServiceImpl.java

示例6: configurationChangedEvent

import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent; //导入依赖的package包/类
/**
 * Update the data model in case an important value has changed
 *
 * @param event
 */
public void configurationChangedEvent(@Observes ConfigurationChangedEvent event) {
    if (event.getKeys().contains("kiwi.context")
            || event.getKeys().contains("kiwi.host")
            || event.getKeys().contains("templating.sort_by_weight")
            || event.getKeys().contains("kiwi.pages.project")) {
        initDataModel();
    }
}
 
开发者ID:apache,项目名称:marmotta,代码行数:14,代码来源:TemplatingServiceImpl.java

示例7: onConfigurationChange

import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent; //导入依赖的package包/类
protected void onConfigurationChange(@Observes ConfigurationChangedEvent event) {
    if (event.containsChangedKeyWithPrefix("core.http.")) {
        try {
            lock.writeLock().lock();
            shutdown();
            initialize();
        } finally {
            lock.writeLock().unlock();
        }
    }
}
 
开发者ID:apache,项目名称:marmotta,代码行数:12,代码来源:HttpClientServiceImpl.java

示例8: configurationChangedEvent

import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent; //导入依赖的package包/类
public void configurationChangedEvent(@Observes ConfigurationChangedEvent event) {
    for (String key : event.getKeys())
        if (key.startsWith("content.")) {
            log.info("Content Service reinitialising ...");
            initialiseReadersWriters();
            break;
        }
}
 
开发者ID:apache,项目名称:marmotta,代码行数:9,代码来源:ContentServiceImpl.java

示例9: onConfigurationChangedEvent

import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent; //导入依赖的package包/类
protected void onConfigurationChangedEvent(@Observes ConfigurationChangedEvent event) {
    if (event.containsChangedKeyWithPrefix(CONFIG_PREFIX)) {
        if (event.containsChangedKey(CONFIG_KEY_SERVICE_ENABLED)) {
            shutdown();
            startup();
        } else if (importWatcher != null) {
            importWatcher.setDeleteAfterImport(configurationService.getBooleanConfiguration(CONFIG_KEY_DELETE_AFTER_IMPORT, true));
            importWatcher.setImportDelay(configurationService.getIntConfiguration(CONFIG_KEY_IMPORT_DELAY, 2500));
            importWatcher.setDirConfigFileName(configurationService.getStringConfiguration(CONFIG_KEY_CONF_FILE, "config"));
            importWatcher.setLockFile(configurationService.getStringConfiguration(CONFIG_KEY_LOCK_FILE, "lock"));
        }
    }
}
 
开发者ID:apache,项目名称:marmotta,代码行数:14,代码来源:ImportWatchServiceImpl.java

示例10: configurationChangedEvent

import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent; //导入依赖的package包/类
public void configurationChangedEvent(@Observes ConfigurationChangedEvent event) {
    if (event.containsChangedKey("statistics.enabled")) {
        if(configurationService.getBooleanConfiguration("statistics.enabled",false)) {
            enableAll();
        } else {
            disableAll();
        }
    }
}
 
开发者ID:apache,项目名称:marmotta,代码行数:10,代码来源:StatisticsServiceImpl.java

示例11: configurationChanged

import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent; //导入依赖的package包/类
public void configurationChanged(@Observes ConfigurationChangedEvent e) {
    if(e.containsChangedKey(LDCACHE_ENABLED)) {
        sesameService.restart();

        if(!isEnabled()) {
            clearSail();
        }
    }
}
 
开发者ID:apache,项目名称:marmotta,代码行数:10,代码来源:LDCacheSailProvider.java

示例12: configurationChanged

import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent; //导入依赖的package包/类
public void configurationChanged(@Observes ConfigurationChangedEvent e) {
    if(e.containsChangedKey(REASONING_ENABLED)) {
        sesameService.restart();

        if(!isEnabled()) {
            sail = null;
        }
    } else if(e.containsChangedKeyWithPrefix("reasoning")) {
        ReasoningConfiguration config = sail.getConfig();
        config.setBatchSize(configurationService.getIntConfiguration("reasoning.batchsize",1000));
        config.setRemoveDuplicateJustifications(configurationService.getBooleanConfiguration("reasoning.remove_duplicate_justifications",false));
    }
}
 
开发者ID:apache,项目名称:marmotta,代码行数:14,代码来源:ReasoningSailProvider.java

示例13: configurationChanged

import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent; //导入依赖的package包/类
public void configurationChanged(@Observes ConfigurationChangedEvent e) {
	if(e.containsChangedKeyWithPrefix("titan")) {
		sesameService.restart();
	}
}
 
开发者ID:vigsterkr,项目名称:marmotta-titan,代码行数:6,代码来源:TitanStoreProvider.java

示例14: configurationChanged

import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent; //导入依赖的package包/类
public void configurationChanged(@Observes ConfigurationChangedEvent e) {
    if(e.containsChangedKeyWithPrefix("virtuoso")) {
        sesameService.restart();
    }
}
 
开发者ID:wikier,项目名称:marmotta-virtuoso,代码行数:6,代码来源:VirtuosoStoreProvider.java

示例15: configurationChanged

import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent; //导入依赖的package包/类
public void configurationChanged(@Observes ConfigurationChangedEvent e) {
    if(e.containsChangedKeyWithPrefix("bigdata")) {
        sesameService.restart();
    }
}
 
开发者ID:apache,项目名称:marmotta,代码行数:6,代码来源:BigDataStoreProvider.java


注:本文中的org.apache.marmotta.platform.core.events.ConfigurationChangedEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。