All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.neo4j.configuration.connectors.ConnectorDefaults Maven / Gradle / Ivy

There is a newer version: 5.23.0
Show newest version
/*
 * Copyright (c) "Neo4j"
 * Neo4j Sweden AB [http://neo4j.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.configuration.connectors;

import java.util.Map;

import org.neo4j.configuration.GraphDatabaseSettings;
import org.neo4j.graphdb.config.Setting;
import org.neo4j.util.VisibleForTesting;

import static org.neo4j.configuration.SettingImpl.newBuilder;
import static org.neo4j.configuration.SettingValueParsers.BOOL;

/**
 * This is introduced to break the circular dependency between {@link GraphDatabaseSettings}
 * and {@link HttpConnector}, {@link HttpsConnector} & {@link BoltConnector}. This would cause classloading deadlocks if accessed out-of-order concurrently.
 * WARNING! None of these fields should be accessed outside the classes mentioned above.
 * Can be properly fixed in next major release (5.0) when the public API can be changed.
 */
@Deprecated( forRemoval = true )
public class ConnectorDefaults
{
    @VisibleForTesting
    public static final Setting http_enabled = newBuilder( "dbms.connector.http.enabled", BOOL, false ).build();
    static final Setting https_enabled = newBuilder( "dbms.connector.https.enabled", BOOL, false ).build();
    static final Setting bolt_enabled = newBuilder( "dbms.connector.bolt.enabled", BOOL, false ).build();

    public static final Map,Object> SERVER_CONNECTOR_DEFAULTS = Map.of(
            http_enabled, true,
            https_enabled, false,
            bolt_enabled, true
    );
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy