org.apache.polygene.api.configuration.Configuration.save()方法的使用及代码示例

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

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

Configuration.save介绍

[英]Persists the modified values in the user configuration instance to the underlying store.
[中]将用户配置实例中修改的值持久化到基础存储。

代码示例

代码示例来源:origin: apache/attic-polygene-java

@Override
public String findPrefix( Class type )
{
  Map<String, String> mapping = config.get().mapping().get();
  String prefix = mapping.get( type.getName() );
  if( prefix == null )
  {
    config.refresh();
    mapping = config.get().mapping().get();
    prefix = Integer.toString( mapping.size() + 1 );
    mapping.put( type.getName(), prefix );
    config.get().mapping().set( mapping );
    config.save();
  }
  actualClasses.put( type.getName(), type );
  return prefix;
}

代码示例来源:origin: apache/attic-polygene-java

configuration.save();
dataDirectory = new File( dataDir );

代码示例来源:origin: apache/attic-polygene-java

config.save();

代码示例来源:origin: apache/attic-polygene-java

@Override
public void changeExternalMailService( String hostName, int port )
{
  MailServiceConfiguration conf = config.get();
  conf.hostName().set( hostName );
  conf.port().set( port );
  config.save();
}
// START SNIPPET: write

相关文章