LOGGER.debug("user session counter for %s is now %d", userId, count);
return count;
}
private int adjustAndGet(String userId, Direction direction) {
RetryPolicy retryPolicy = new BoundedExponentialBackoffRetry(BASE_SLEEP_TIME_MS, MAX_SLEEP_TIME_MS, MAX_RETRIES);
DistributedAtomicInteger distributedAtomicInteger = new DistributedAtomicInteger(curatorFramework, counterPath(userId), retryPolicy);
try {
distributedAtomicInteger.initialize(0); // this will respect an existing value but set uninitialized values to 0
} catch (Exception e) {