Java 类org.neo4j.graphdb.config.Setting 实例源码

项目:neo4j-websockets    文件:WebsocketsKernelExtensionFactory.java   
@Override
public Lifecycle newInstance(KernelContext context, Dependencies dependencies) throws Throwable {
    GraphDatabaseService graphDatabaseService = dependencies.getGraphDatabaseService();
    Config config = dependencies.getConfig();

    Setting<HostnamePort> hostnamePort = setting("websocket_host", HOSTNAME_PORT, "0.0.0.0:8765");
    Setting<List<String>> packageNames = setting("websocket_packages", STRING_LIST, "");
    Setting<String> managementPath = setting("websocket_management_path", STRING, "/ws/management");
    Setting<String> commandPath = setting("websocket_data_path", STRING, "/ws/data");

    ClusterMemberEvents clusterMemberEvents = null;

    if (graphDatabaseService instanceof HighlyAvailableGraphDatabase) {
        logger.info("[newInstance] cluster installation");
        clusterMemberEvents = dependencies.getClusterMemberEvents();
    }

    return new WebsocketsKernelExtension(
            graphDatabaseService, clusterMemberEvents, config.get(packageNames), config.get(hostnamePort),
            config.get(managementPath), config.get(commandPath));
}
项目:neo4j-lucene5-index    文件:TestLuceneBatchInsert.java   
private static ConfigurationParameter configure( Setting<?> key, String value )
{
    return new ConfigurationParameter( key, value );
}
项目:neo4j-lucene5-index    文件:TestLuceneBatchInsert.java   
public ConfigurationParameter( Setting<?> key, String value )
{
    this.key = key;
    this.value = value;
}