We did something similar in .NET via the ServiceStack library and some custom code. We open sourced it on github too. We used it to prevent a method from being called more than once at a time primarily.<p><a href="http:&#x2F;&#x2F;stackify.com&#x2F;distributed-method-mutexing&#x2F;" rel="nofollow">http:&#x2F;&#x2F;stackify.com&#x2F;distributed-method-mutexing&#x2F;</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;stackify&#x2F;redis-tagging-locking-sample&#x2F;tree&#x2F;master&#x2F;src&#x2F;DistributedLockingPerMethod" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;stackify&#x2F;redis-tagging-locking-sample&#x2F;tre...</a>