Created
March 13, 2017 21:07
-
-
Save redvasily/d97f1b42153af22fe8cb07467feb8a03 to your computer and use it in GitHub Desktop.
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
val value = replica.getLong("long-value").join() | |
while (true) { | |
val random = ThreadLocalRandom.current() | |
try { | |
log.info("Incrementing") | |
val f = value.incrementAndGet().join() | |
log.info("New value: {}", f) | |
Thread.sleep(random.nextLong(1000, 3000)) | |
} catch (e: Exception) { | |
log.error("Some error", e) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment