本文整理汇总了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();
}
}
示例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();
}
}
示例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();
}
}
示例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);
}
}
}
示例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();
}
}
}
示例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();
}
}
示例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();
}
}
}
示例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;
}
}
示例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"));
}
}
}
示例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();
}
}
}
示例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();
}
}
}
示例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));
}
}
示例13: configurationChanged
import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent; //导入依赖的package包/类
public void configurationChanged(@Observes ConfigurationChangedEvent e) {
if(e.containsChangedKeyWithPrefix("titan")) {
sesameService.restart();
}
}
示例14: configurationChanged
import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent; //导入依赖的package包/类
public void configurationChanged(@Observes ConfigurationChangedEvent e) {
if(e.containsChangedKeyWithPrefix("virtuoso")) {
sesameService.restart();
}
}
示例15: configurationChanged
import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent; //导入依赖的package包/类
public void configurationChanged(@Observes ConfigurationChangedEvent e) {
if(e.containsChangedKeyWithPrefix("bigdata")) {
sesameService.restart();
}
}