public synchronized long add(long delta) {
        try {
            AtomicValue<Long> value = counter.add(delta);
            if (!value.succeeded()) {
                throw new IllegalStateException("Add did not succeed");
            }
            return value.postValue();
        } catch (Exception e) {
            throw new IllegalStateException("Unable to add value", e);
        }
    }
Atomically add and return resulting value.

@param delta value to add, may be negative
@return the resulting value
@throws IllegalStateException if addition fails
zkfacade/src/main/java/com/yahoo/vespa/curator/recipes/CuratorCounter.java