Lanky Dan Blog

Async/await in coroutines

August 02, 2020

Async/await is a common feature in many languages (naming might vary), that allows you to execute functions asynchronously while waiting for…

Cancelling child coroutines

July 26, 2020

Following on from my previous post, Cancelling coroutines, we will look at how cancelling a coroutine affects its children. First let’s…

Missing @EntityScan annotation in Spring Data Neo4j

July 20, 2020
springspring dataspring data neo4jneo4jjava

Not including the annotation and specifying the correct packages in your Spring Data Neo4j application can cause the following error: Yes…

Mapping a path query in Spring Data Neo4j

July 19, 2020
springspring dataspring data neo4jneo4jjava

Spring data does a lot to help you focus on writing your cypher queries while it handles mapping the results for you. However, when your…

Java friendly Kotlin - default arguments

June 25, 2020

Kotlin functions and constructors can define default arguments, allowing calls to them to skip any argument that has a default value. This…

Transaction savepoints in Spring JDBC

June 14, 2020
springspring dataspring data jdbckotlinjava

Savepoints allow you to create markers within a transaction which you can rollback to, without preventing the transaction from being…

Cancelling coroutines

May 11, 2020

Sooner or later, you will need to cancel a coroutine that you started. Let’s look at how you can do just that. How to cancel a job One of…

Waiting for coroutines

April 26, 2020

Coroutines allow you to execute tasks asynchronously without blocking the calling thread, such as the main thread. Great, but sometimes you…

Launching your coroutine knowledge

April 17, 2020

Coroutines are essentially lightweight threads that allow your applications to squeeze more juice out of the machines they are running on…

Java friendly Kotlin - static functions

March 18, 2020

In this post, we will look at writing static functions in Kotlin that treat Java callers as first-class citizens. Recap There are three ways…

All posts