package com.atlassian.stash.internal.concurrent;

public class ClusterLockMXBeanAdapter implements ClusterLockMXBean {

    private final MonitoredClusterLockService lockService;

    public ClusterLockMXBeanAdapter(MonitoredClusterLockService lockService) {
        this.lockService = lockService;
    }

    public long getLockedCount() {
        return lockService.getLockedCount();
    }

    public int getQueuedThreadCount() {
        return lockService.getQueuedThreadCount();
    }

    public long getTotalAcquiredCount() {
        return lockService.getTotalAcquiredCount();
    }

    @Override
    public long getTotalAcquireErrorCount() {
        return lockService.getTotalAcquireErrorCount();
    }

    public long getTotalAcquireTimeMillis() {
        return lockService.getTotalAcquireTimeMillis();
    }

    public long getTotalReleasedCount() {
        return lockService.getTotalReleasedCount();
    }

    @Override
    public long getTotalReleaseErrorCount() {
        return lockService.getTotalReleaseErrorCount();
    }
}
