public interface Connection
Connections can support the execution of multiple statements. Statements are executed in order of insertion.
| Modifier and Type | Method and Description |
|---|---|
void |
add(Statement statement)
Adds the given statement to execute within this Connection.
|
void |
commit()
Commits this Connection to Neo4J.
|
void |
flush()
Flushes the Statements currently held by this Connection to Neo4J.
|
java.time.OffsetDateTime |
getExpiry()
Retrieves when this Connection will expire.
|
java.util.List<Statement> |
getStatements()
Retrieves any Statements that have not been executed in the cache.
|
void |
resetExpiry()
Extends the life of this Connection.
|
void |
rollback()
Rolls back any changes made by this Connection.
|
void add(Statement statement)
statement - A statement that should be added to this Connection.java.util.List<Statement> getStatements()
This will be empty if flush or commit is called before accessing this.
java.time.OffsetDateTime getExpiry()
void resetExpiry()
void flush()
Neo4jServerException - If an error occurs in flushing to the database. It is generally expected that a client will not be able
to recover from this error.Neo4jServerMultiException - If the Neo4J Server responds with with multiple errors (this probably doesn't happen but there is no way
to know for sure).void commit()
Neo4jClientException - If an error occurs in committing this Connection to the database. Clients may then choose to catch and
rollback this Connection if desired.void rollback()
Neo4jServerException - If an error occurs trying to rollback the Connection.Neo4jServerMultiException - If the Neo4J Server responds with with multiple errors (this probably doesn't happen but there is no way
to know for sure).