package com.atlassian.stash.internal.repository;

/**
 * Exposes repository properties to jmx.  Currently only exposes the total number of repositories known to stash. This is an {@code MXBean} to ensure
 * the broadest remote client compatibility.
 * @since 3.8
 */
public class RepositoryMXBeanAdapter implements RepositoryMXBean {

    private final InternalRepositoryService delegate;

    public RepositoryMXBeanAdapter(InternalRepositoryService delegate) {
        this.delegate = delegate;
    }

    /**
     * @return the number of repositories currently configured in stash across all projects
     */
    public long getCount() {
        return delegate.getCount();
    }
}
