Changes to Java API in Neo4j 5
This page lists all changes to Java API between Neo4j 4.4 and Neo4j 5.x.
Changes to classes, interfaces, and enums
Class | Change | Action |
---|---|---|
|
Removed |
Format is configured in the Log4j 2 configuration file. |
|
Removed |
Use |
|
Removed |
Use standalone tool. |
|
Removed |
Used by online backup. |
|
Removed |
Use |
|
Removed |
Use |
|
Removed |
Accidentally added to the public API. |
|
Removed |
Enum used in removed setting. |
|
Removed |
Enum used in removed setting. |
|
Removed |
Enum used in removed setting. |
|
Removed |
Enum used in removed setting. |
|
New |
Used to provide a |
|
New |
Entry point for seed providers. See SeedProvider. |
|
New |
Common interface for |
|
New |
New enum used in settings. |
|
New |
New enum used in settings. |
Changes to methods
org.neo4j.logging.Log
The following methods are removed:
Method | Change | Action |
---|---|---|
|
Removed |
Use |
|
Removed |
Use |
|
Removed |
Use |
|
Removed |
Use |
org.neo4j.graphdb.config.Setting<T>
The following method is removed:
Method | Change | Action |
---|---|---|
|
Removed |
Not used anymore. Used to mark settings as internal hidden settings. |
org.neo4j.graphdb.Entity
The following methods are added.
They are visible from the inheriting Node
and Relationship
:
Method | Change | Action |
---|---|---|
|
New |
Returns the unique element ID. Guaranteed to be unique only within a transaction. |
|
New |
Moved from |
org.neo4j.graphdb.schema.IndexType
The following index type is removed:
Index type | Change | Action |
---|---|---|
|
Removed |
Is replaced by |
org.neo4j.graphdb.spatial.Coordinate
The following method is removed:
Method | Change | Action |
---|---|---|
|
Removed |
Replaced by the two following methods: |
org.neo4j.graphdb.Transaction
The following methods are added:
Method | Change | Action |
---|---|---|
|
New |
Looks up a node by element ID. |
|
New |
Looks up a relationship by element ID. |
org.neo4j.harness.junit.extension.Neo4jExtensionBuilder
The following methods are removed:
Method | Change | Action |
---|---|---|
|
Removed |
Use |
|
Removed |
Use |
|
Removed |
Removed. |
|
Removed |
Use |
org.neo4j.harness.junit.rule.Neo4jRule
The following methods are removed:
Method | Change | Action |
---|---|---|
|
Removed |
Use |
|
Removed |
Use |
|
Removed |
Removed. |
|
Removed |
Use |
org.neo4j.harness.Neo4jBuilders
The following method is removed:
Method | Change | Action |
---|---|---|
|
Removed |
Use |
org.neo4j.harness.Neo4jConfigurator<T>
The following methods are removed:
Method | Change | Action |
---|---|---|
|
Removed |
Use |
|
Removed |
Removed. |
|
Removed |
Use |
|
Removed |
Use |
com.neo4j.harness.junit.rule.EnterpriseNeo4jRule
The deprecated constructor that took a File
is removed:
Method | Change | Action |
---|---|---|
|
Removed |
Use |
org.neo4j.kernel.api.exceptions.Status
The following status codes are added:
Status code | Change | Description |
---|---|---|
|
New |
The home database provided does not currently exist. |
|
New |
The requested format is deprecated. |
|
New |
The hinted index does not exist, please check the schema. |
|
New |
Did not supply query with enough parameters. |
|
New |
The following status codes are removed:
Statement.MissingAlias | Removed | |
---|---|---|
|
Removed |
Some status codes are renamed to indicate changed severity from WARNING
to INFORMATION
:
Old name | New name |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Renamed classes, interfaces, and enums
Old name | New name |
---|---|
|
|
|
|
|
|
org.neo4j.graphdb.event.DatabaseEventListener
The following two methods do not have a default implementation anymore and need to be implemented by listeners:
-
void databaseCreate(DatabaseEventContext)
-
void databaseDrop(DatabaseEventContext)
org.neo4j.graphdb.GraphDatabaseService
A new method is added, which is a non-blocking variant of the already existing method with the same name:
-
boolean isAvailable()
org.neo4j.graphdb.Node
The following methods are changed to return a ResourceIterable
instead of an Iterable
:
Method | Change |
---|---|
|
New |
|
New |
|
New |
|
New |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
org.neo4j.dbms.api.DatabaseManagementServiceBuilder
This class now implements Neo4jDatabaseManagementServiceBuilder
, which is the new preferred interface to use.
As part of this change, the following fields and methods are removed since they exposed internal implementations:
-
Config.Builder config
-
List<DatabaseEventListener> databaseEventListeners
-
DependencyResolver dependencies
-
List<ExtensionFactory<?>> extensions
-
Path homeDirectory
-
Monitors monitors
-
Map<String,URLAccessRule> urlAccessRules
-
LogProvider userLogProvider
-
DatabaseManagementServiceBuilder(File)
-
DatabaseManagementServiceBuilder(Path, Predicate<Class<? extends ExtensionFactory>>)
-
DatabaseManagementServiceBuilder loadPropertiesFromFile(String)
-
DatabaseManagementServiceBuilder setConfigRaw(Map<String,String>)
-
DatabaseManagementServiceBuilder setExternalDependencies(DependencyResolver)
-
DatabaseManagementServiceBuilder setMonitors(Monitors)
-
DatabaseManagementServiceBuilder addURLAccessRule(String, URLAccessRule)
-
DatabaseManagementService newDatabaseManagementService(Config, ExternalDependencies)
-
DbmsInfo getDbmsInfo(Config)
-
String getEdition()
-
Function<GlobalModule,AbstractEditionModule> getEditionFactory(Config)
-
Config augmentConfig(Config)
-
ExternalDependencies databaseDependencies()
Changes to Neo4j settings
com.neo4j.configuration.OnlineBackupSettings
Setting | Change |
---|---|
|
Removed |
|
New |
com.neo4j.configuration.MetricsSettings
All settings to enable and disable a metric type are replaced by metrics_filter
, which takes a regex of what metrics to enable:
Setting | Change |
---|---|
|
New |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
com.neo4j.configuration.OnlineBackupSettings
Setting | Change |
---|---|
|
New |
|
Removed |
com.neo4j.configuration.SecuritySettings
Setting | Change |
---|---|
|
New |
|
New |
|
New |
|
New |
|
New |
|
Removed |
As part of the logging changes, the following settings are removed and moved to the Log4j 2 configuration file:
Setting | Change |
---|---|
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
com.neo4j.configuration.SecuritySettings.OIDCSetting
Setting | Change |
---|---|
|
New |
|
Removed |
com.neo4j.configuration.EnterpriseEditionSettings
Setting | Change |
---|---|
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
Removed |
|
Removed |
Changes to Neo4j cluster settings
com.neo4j.configuration.ClusterNetworkSettings
Setting | Change |
---|---|
|
New |
|
New |
|
New |
|
New |
|
New |
com.neo4j.configuration.KubernetesSettings
Setting | Change |
---|---|
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
com.neo4j.configuration.ClusterSettings
A few constants are added:
Setting | Change |
---|---|
|
New |
|
New |
|
New |
The following settings are moved to the ClusterNetworkSettings
class and renamed:
Setting | Change |
---|---|
|
Removed |
|
Removed |
|
Removed |
|
Removed |
The following settings are moved to KubernetesSettings
:
Setting | Change |
---|---|
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
The following settings are added:
Setting | Change |
---|---|
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
The following settings are removed:
Setting | Change |
---|---|
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
org.neo4j.configuration.connectors.BoltConnector
Setting | Change |
---|---|
|
Removed |
org.neo4j.configuration.GraphDatabaseSettings
The following settings are added:
Setting | Change |
---|---|
|
New |
|
New |
The following settings are removed:
Setting | Change |
---|---|
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
The setting record_format
is renamed to db_format
to allow future, non-record formats, to be selected:
Setting | Change |
---|---|
|
New |
|
Removed |
The following settings are removed and their default values are now permanent:
Setting | Change |
---|---|
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
The setting pagecache_memory
has a changed type:
Setting | Change |
---|---|
|
New |
|
Removed |
As part of the logging changes two new settings are added that will point to the Log4j 2 configuration files. All old logging settings are removed:
Setting | Change |
---|---|
|
New |
|
New |
|
New |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
|
Removed |
Changes to the Traversal API
The traversal API can be accessed through Transaction.traversalDescription()
and Transaction.bidirectionalTraversalDescription()
.
For the full documentation, see Java Reference → The traversal framework
.
Added classes, interfaces, and enums as part of the Traversal API
interface | org.neo4j.graphdb.traversal.BidirectionalTraversalDescription |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
org.neo4j.graphdb.PathExpanders
A few commonly used `PathExpander`s are added:
Setting | Change |
---|---|
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |
|
New |