本文整理了Java中org.neo4j.kernel.configuration.Config.getConfigValues()
方法的一些代码示例,展示了Config.getConfigValues()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Config.getConfigValues()
方法的具体详情如下:
包路径:org.neo4j.kernel.configuration.Config
类名称:Config
方法名:getConfigValues
暂无
代码示例来源:origin: neo4j/neo4j
@Deprecated
@Override
public Iterator<String> getKeys()
{
return config.getConfigValues().keySet().iterator();
}
代码示例来源:origin: neo4j/neo4j
ConfigurationBean( KernelData kernel, ManagementSupport support ) throws NotCompliantMBeanException
{
super( CONFIGURATION_MBEAN_NAME, kernel, support );
this.config = kernel.getConfig().getConfigValues();
}
代码示例来源:origin: neo4j/neo4j
@Admin
@Description( "List the currently active config of Neo4j." )
@Procedure( name = "dbms.listConfig", mode = DBMS )
public Stream<ConfigResult> listConfig( @Name( value = "searchString", defaultValue = "" ) String searchString )
{
Config config = graph.getDependencyResolver().resolveDependency( Config.class );
String lowerCasedSearchString = searchString.toLowerCase();
return config.getConfigValues().values().stream()
.filter( c -> !c.internal() )
.filter( c -> c.name().toLowerCase().contains( lowerCasedSearchString ) )
.map( ConfigResult::new )
.sorted( Comparator.comparing( c -> c.name ) );
}
代码示例来源:origin: neo4j/neo4j
static HashMap<CoordinateReferenceSystem,EnvelopeSettings> envelopeSettingsFromConfig( Config config )
for ( Map.Entry<String,ConfigValue> entry : config.getConfigValues().entrySet() )
代码示例来源:origin: neo4j/neo4j
@Test
public void configValuesContainsConnectors()
{
Config config = Config.builder().withServerDefaults().build();
List<String> connectorSettings = config.getConfigValues().entrySet().stream()
.map( Entry::getKey )
.filter( c -> c.startsWith( "dbms.connector" ) )
.filter( c -> c.endsWith( ".enabled" ) )
.collect( toList() );
assertThat( connectorSettings, containsInAnyOrder( "dbms.connector.http.enabled",
"dbms.connector.https.enabled",
"dbms.connector.bolt.enabled" ) );
}
代码示例来源:origin: neo4j/neo4j
@Test
public void webServerThreadCountDefaultShouldBeDocumented()
{
Config config = Config.builder().withServerDefaults().build();
String documentedDefaultValue =
config.getConfigValues().entrySet().stream()
.filter( c -> c.getKey().equals( ServerSettings.webserver_max_threads.name() ) )
.map( Entry::getValue )
.findAny()
.orElseThrow( () -> new RuntimeException( "Setting not present!" ) )
.documentedDefaultValue()
.orElseThrow( () -> new RuntimeException( "Default value not present!" ) );
assertEquals( "Number of available processors, or 500 for machines which have more than 500 processors.", documentedDefaultValue );
}
代码示例来源:origin: neo4j/neo4j
@Test
public void shouldBeFoundInServerDefaults()
{
// given
Config serverDefaultConfig = Config.builder().withServerDefaults().build();
// when
Stream<ConfigValue> cvStream = serverDefaultConfig.getConfigValues().values().stream();
// then
assertEquals( 1, cvStream.filter( c -> c.name().equals( certificates_directory.name() ) ).count() );
}
}
代码示例来源:origin: neo4j/neo4j
@Test
public void connectorSettingHasItsOwnValues()
{
Config config = Config.builder().withServerDefaults()
.withSetting( new HttpConnector( "http" ).address, "localhost:123" ).build();
ConfigValue address = config.getConfigValues().entrySet().stream()
.filter( c -> c.getKey().equals( "dbms.connector.http.address" ) )
.map( Entry::getValue )
.findAny()
.orElseThrow( () -> new RuntimeException( "Setting not present!" ) );
assertTrue( address.deprecated() );
assertEquals( Optional.of( "dbms.connector.http.listen_address" ), address.replacement() );
}
}
代码示例来源:origin: neo4j/neo4j
@Test
public void shouldSetInternalParameter()
{
// Given
Config config = Config.builder()
.withSetting( MySettingsWithDefaults.secretSetting, "false" )
.withSetting( MySettingsWithDefaults.hello, "ABC" )
.withConfigClasses( Arrays.asList( mySettingsWithDefaults, myMigratingSettings ) )
.build();
// Then
assertTrue( config.getConfigValues().get( MySettingsWithDefaults.secretSetting.name() ).internal() );
assertFalse( config.getConfigValues().get( MySettingsWithDefaults.hello.name() ).internal() );
}
代码示例来源:origin: neo4j/neo4j
@Test
public void shouldSetDocumentedDefaultValue()
{
// Given
Config config = Config.builder()
.withSetting( MySettingsWithDefaults.secretSetting, "false" )
.withSetting( MySettingsWithDefaults.hello, "ABC" )
.withConfigClasses( Arrays.asList( new MySettingsWithDefaults(), myMigratingSettings ) )
.build();
// Then
assertEquals( Optional.of( "<documented default value>" ),
config.getConfigValues().get( MySettingsWithDefaults.secretSetting.name() )
.documentedDefaultValue() );
assertEquals( Optional.empty(),
config.getConfigValues().get( MySettingsWithDefaults.hello.name() ).documentedDefaultValue() );
}
代码示例来源:origin: neo4j/neo4j
@Test
public void shouldSetSecretParameter()
{
// Given
Config config = Config.builder()
.withSetting( MySettingsWithDefaults.password, "this should not be visible" )
.withSetting( MySettingsWithDefaults.hello, "ABC" )
.withConfigClasses( Arrays.asList( mySettingsWithDefaults, myMigratingSettings ) )
.build();
// Then
assertTrue( config.getConfigValues().get( MySettingsWithDefaults.password.name() ).secret() );
assertFalse( config.getConfigValues().get( MySettingsWithDefaults.hello.name() ).secret() );
String configText = config.toString();
assertTrue( configText.contains( Secret.OBSFUCATED ) );
assertFalse( configText.contains( "this should not be visible" ) );
assertFalse( configText.contains( config.get( MySettingsWithDefaults.password ) ) );
}
代码示例来源:origin: org.neo4j.app/neo4j-server
@Deprecated
@Override
public Iterator<String> getKeys()
{
return config.getConfigValues().keySet().iterator();
}
代码示例来源:origin: org.neo4j/neo4j-jmx
ConfigurationBean( KernelData kernel, ManagementSupport support ) throws NotCompliantMBeanException
{
super( CONFIGURATION_MBEAN_NAME, kernel, support );
this.config = kernel.getConfig().getConfigValues();
}
代码示例来源:origin: org.neo4j/neo4j-kernel
@Admin
@Description( "List the currently active config of Neo4j." )
@Procedure( name = "dbms.listConfig", mode = DBMS )
public Stream<ConfigResult> listConfig( @Name( value = "searchString", defaultValue = "" ) String searchString )
{
Config config = graph.getDependencyResolver().resolveDependency( Config.class );
String lowerCasedSearchString = searchString.toLowerCase();
return config.getConfigValues().values().stream()
.filter( c -> !c.internal() )
.filter( c -> c.name().toLowerCase().contains( lowerCasedSearchString ) )
.map( ConfigResult::new )
.sorted( Comparator.comparing( c -> c.name ) );
}
代码示例来源:origin: org.neo4j/neo4j-kernel
static HashMap<CoordinateReferenceSystem,EnvelopeSettings> envelopeSettingsFromConfig( Config config )
for ( Map.Entry<String,ConfigValue> entry : config.getConfigValues().entrySet() )
内容来源于网络,如有侵权,请联系作者删除!