class CloudBreakerEntryImpl extends BreakerEntrySim {
    String breakerName;
    int thresholdValue;
    Semaphore limiter;

    public CloudBreakerEntryImpl(String breakerName, int permits) {
        this.breakerName = breakerName;
        this.thresholdValue = permits;
        this.limiter = new Semaphore(permits);
    }

    @Override
    public AutoCloseable enter() throws BreakerException {<FILL_FUNCTION_BODY>}

    @Override
    public void close() throws Exception {
        limiter.release();
    }

    @Override
    public void reset(int value) {
        if (thresholdValue != value) {
            thresholdValue = value;

            limiter = new Semaphore(value);
        }
    }
}

        if (limiter.tryAcquire()) {
            return this;
        } else {
            throw new BreakerException();
        }
    
<methods>public non-sealed void <init>() ,public abstract void reset(int) <variables>