public abstract class ThirdPartyIntegrationModule<ID> extends BaseTxDrivenModule<Collection<WriteOperation<?>>>
WriteOperations is built, representing all the about-to-be-committed changes
in a way that allows it to be sent over the wire (no dependency on Neo4j APIs).
The collection of WriteOperations is passed into the BaseTxDrivenModule.afterCommit(Object) method after the transaction
has successfully committed. The BaseTxDrivenModule.afterCommit(Object) should be overridden by sub-classes.| Modifier | Constructor and Description |
|---|---|
protected |
ThirdPartyIntegrationModule(String moduleId)
Construct a new module.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<WriteOperation<?>> |
beforeCommit(ImprovedTransactionData transactionData)
Perform the core business logic of this module before a transaction commits.
|
protected abstract DetachedNode<ID> |
nodeRepresentation(org.neo4j.graphdb.Node node) |
protected abstract DetachedRelationship<ID,? extends DetachedNode<ID>> |
relationshipRepresentation(org.neo4j.graphdb.Relationship relationship) |
afterCommit, afterRollback, getConfiguration, initialize, reinitialize, shutdown, startgetIdclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetIdprotected ThirdPartyIntegrationModule(String moduleId)
moduleId - ID of this module. Must not be null or empty.public Collection<WriteOperation<?>> beforeCommit(ImprovedTransactionData transactionData) throws DeliberateTransactionRollbackException
TxDrivenModule.getConfiguration() that the module isn't interested in this transaction, this method will
not be called.
Note that in case this method throws RuntimeException (including NeedsInitializationException),
TxDrivenModule.afterCommit(Object) will be called with a null argument.
Note that in case this method throws DeliberateTransactionRollbackException, TxDrivenModule.afterRollback(Object)
will be called with a null argument.transactionData - data about the soon-to-be-committed transaction. It is already filtered based on TxDrivenModule.getConfiguration().null) that will be passed on to TxDrivenModule.afterCommit(Object) of this object. Only return null if you do nothing in TxDrivenModule.afterCommit(Object).DeliberateTransactionRollbackException - if the module wants to prevent the transaction from committing.protected abstract DetachedRelationship<ID,? extends DetachedNode<ID>> relationshipRepresentation(org.neo4j.graphdb.Relationship relationship)
protected abstract DetachedNode<ID> nodeRepresentation(org.neo4j.graphdb.Node node)
Copyright © 2013-2016–2018 Graph Aware Limited. All rights reserved.