public class RestConnectionImpl extends java.lang.Object implements Connection
| Constructor and Description |
|---|
RestConnectionImpl(HttpClient client,
java.lang.String transactionEndpointUrl) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Statement statement)
Adds the given statement to execute within this Connection.
|
static void |
closeConnection() |
void |
commit()
Commits this Connection to Neo4J.
|
void |
flush()
Flushes the Statements currently held by this Connection to Neo4J.
|
static Connection |
getConnection(HttpClient client,
java.lang.String transactionEndpointUrl) |
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.
|
public RestConnectionImpl(HttpClient client, java.lang.String transactionEndpointUrl)
public static Connection getConnection(HttpClient client, java.lang.String transactionEndpointUrl)
public static void closeConnection()
public void add(Statement statement)
Connectionadd in interface Connectionstatement - A statement that should be added to this Connection.public java.util.List<Statement> getStatements()
Connection
This will be empty if flush or commit is called before accessing this.
getStatements in interface Connectionpublic java.time.OffsetDateTime getExpiry()
ConnectiongetExpiry in interface Connectionpublic void flush()
Connectionflush in interface Connectionpublic void commit()
Connectioncommit in interface Connectionpublic void resetExpiry()
ConnectionresetExpiry in interface Connectionpublic void rollback()
Connectionrollback in interface Connection