-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): Support beginTransaction with TransactionConfig duration (#…
…620) * Configure timeout before beginning neo4j transactions * Create a new neo4j session if transaction propagation requires a new one * Add integration tests
- Loading branch information
1 parent
d63b4ea
commit 3c69480
Showing
7 changed files
with
80 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...ore-gorm-neo4j/src/main/groovy/org/grails/datastore/gorm/neo4j/util/GrailsProcedures.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.grails.datastore.gorm.neo4j.util; | ||
|
||
import org.neo4j.procedure.Description; | ||
import org.neo4j.procedure.Name; | ||
import org.neo4j.procedure.Procedure; | ||
|
||
/** | ||
* Grails procedures for Neo4j embedded server. | ||
*/ | ||
public class GrailsProcedures { | ||
|
||
/** | ||
* Procedure for Neo4j that sleeps for the specified number of milliseconds. | ||
* @param millis the length of time to sleep in milliseconds | ||
*/ | ||
@Procedure("grails.sleep") | ||
@Description("Sleep for the specified number of milliseconds.") | ||
public void sleep(@Name(value = "millis", defaultValue = "1000") Long millis) { | ||
try { | ||
Thread.sleep(millis); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |