Package app.ductape.sdk.graph.adapters
Class Neo4jBoltGraphAdapter
java.lang.Object
app.ductape.sdk.graph.adapters.BaseGraphAdapter
app.ductape.sdk.graph.adapters.Neo4jBoltGraphAdapter
Production Neo4j connectivity via official Bolt driver (
bolt://, neo4j://, neo4j+s://, …).
Selected automatically by GraphAdapterFactory when connectionUrl/uri uses a Bolt-capable scheme.-
Field Summary
Fields inherited from class app.ductape.sdk.graph.adapters.BaseGraphAdapter
connected, connectionOptions, connectionUrl, maxRetries, supportedFeatures -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbeginTransaction(Map<String, Object> options) TS parity: open a Bolt session + transaction, honoring an optionalmodefield ("read"or"write", default"write") to pick the driverAccessMode.voidcommitTransaction(Map<String, Object> transaction) TScommit(): commits the underlying Bolt transaction and closes the session.countNodes(Map<String, Object> options) TScountNodes(labels?, where?, ...)aggregated result{ count }.countRelationships(Map<String, Object> options) TScountRelationships(types?, where?, ...)aggregated result{ count }.createNode(Map<String, Object> node) createRelationship(Map<String, Object> relationship) voidfindNodeById(Object id) TSfindNodeById— wrapped as{ node }when present.TSfindRelationshipById— wrapped as{ relationship }when present.findRelationships(Map<String, Object> where) protected GraphTypes.GraphTypestatic booleanisBoltConnection(Map<String, Object> options) voidrollbackTransaction(Map<String, Object> transaction) TSrollback(): idempotent and silent — already-completed transactions are a no-op (TS catches and swallows the second-rollback error).testConnection(Map<String, Object> options) Methods inherited from class app.ductape.sdk.graph.adapters.BaseGraphAdapter
addLabels, allPaths, attemptReconnect, createNodeConstraint, createNodeIndex, createRelationshipIndex, dropConstraint, dropIndex, ensureConnected, executeWithRetry, executeWithRetry, findConnectedComponents, fullTextSearch, getGraphType, getNeighborhood, getSupportedFeatures, isConnected, isConnectionError, listConstraints, listIndexes, listLabels, listRelationshipTypes, removeLabels, setLabels, shortestPath, supportsFeature, traverse, vectorSearch
-
Constructor Details
-
Neo4jBoltGraphAdapter
public Neo4jBoltGraphAdapter()
-
-
Method Details
-
isBoltConnection
-
graphType
- Specified by:
graphTypein classBaseGraphAdapter
-
connect
- Specified by:
connectin classBaseGraphAdapter
-
testConnection
- Specified by:
testConnectionin classBaseGraphAdapter
-
disconnect
public void disconnect()- Specified by:
disconnectin classBaseGraphAdapter
-
query
- Overrides:
queryin classBaseGraphAdapter
-
createNode
- Specified by:
createNodein classBaseGraphAdapter
-
findNodes
- Specified by:
findNodesin classBaseGraphAdapter
-
createRelationship
- Specified by:
createRelationshipin classBaseGraphAdapter
-
findRelationships
- Specified by:
findRelationshipsin classBaseGraphAdapter
-
beginTransaction
TS parity: open a Bolt session + transaction, honoring an optionalmodefield ("read"or"write", default"write") to pick the driverAccessMode. The returned map carriesid,status, andmodesoGraphTransactionManagercan report status nuances.- Overrides:
beginTransactionin classBaseGraphAdapter
-
commitTransaction
TScommit(): commits the underlying Bolt transaction and closes the session. If commit throws (e.g. constraint violation flushed at commit), we still close the session and remove tracking so callers can retry — TS swallows rollback errors after a failed commit, soGraphTransactionManagerdoes the rollback dance one level up.- Overrides:
commitTransactionin classBaseGraphAdapter
-
rollbackTransaction
TSrollback(): idempotent and silent — already-completed transactions are a no-op (TS catches and swallows the second-rollback error). The session is always closed.- Overrides:
rollbackTransactionin classBaseGraphAdapter
-
getStatistics
- Overrides:
getStatisticsin classBaseGraphAdapter
-
countNodes
Description copied from class:BaseGraphAdapterTScountNodes(labels?, where?, ...)aggregated result{ count }.- Overrides:
countNodesin classBaseGraphAdapter
-
findNodeById
Description copied from class:BaseGraphAdapterTSfindNodeById— wrapped as{ node }when present.- Overrides:
findNodeByIdin classBaseGraphAdapter
-
findRelationshipById
Description copied from class:BaseGraphAdapterTSfindRelationshipById— wrapped as{ relationship }when present.- Overrides:
findRelationshipByIdin classBaseGraphAdapter
-
countRelationships
Description copied from class:BaseGraphAdapterTScountRelationships(types?, where?, ...)aggregated result{ count }.- Overrides:
countRelationshipsin classBaseGraphAdapter
-