class ZMSFileChangeLogStoreFactory implements ChangeLogStoreFactory {

    @Override
    public ChangeLogStore create(String ztsHomeDir, PrivateKey privateKey, String privateKeyId) {

        // if we have mtls settings configured then we should use those
        // for our client otherwise we'll fall back to our private key access

        final String rootDirectory = ztsHomeDir + File.separator + ZTS_DATA_STORE;
        ChangeLogStore store = mtlsClientChangeLogStore(rootDirectory);
        if (store == null) {
            LOGGER.info("mtls client change log store not available");
            store = new ZMSFileChangeLogStore(rootDirectory, privateKey, privateKeyId);
        }
        return store;
    }

}