Netflix has open sourced a lot of code that you can look at. Hysterix, Eureka, Titus, etc. Disclaimer, I worked on open sourcing Titus and I think it has some great Java code.
Thank you for sharing! Will take a look at Titus - it seems to be split into three - API, Control Plane and Executor.
For anyone wanting to take a look:
https://github.com/Netflix/eureka
https://github.com/Netflix/Hystrix
https://netflix.github.io/titus/
https://github.com/Netflix/titus-api-definitions