All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.newrelic.api.agent.SlowQueryDatastoreParameters Maven / Gradle / Ivy

There is a newer version: 8.16.0
Show newest version
/*
 *
 *  * Copyright 2020 New Relic Corporation. All rights reserved.
 *  * SPDX-License-Identifier: Apache-2.0
 *
 */

package com.newrelic.api.agent;

/**
 * The input parameters required to report a slow datastore query on the {@link TracedMethod}. Do not use this class
 * directly. Instead use {@link DatastoreParameters}.
 *
 * @since 3.36.0
 */
public class SlowQueryDatastoreParameters extends DatastoreParameters {

    /**
     * The raw query object used for transforming into a raw query String and obfuscated query String
     */
    private final T rawQuery;

    /**
     * A converter to transform the rawQuery into a raw query String and obfuscated query String
     */
    private final QueryConverter queryConverter;

    protected SlowQueryDatastoreParameters(DatastoreParameters datastoreParameters, T rawQuery,
            QueryConverter queryConverter) {
        super(datastoreParameters);
        this.rawQuery = rawQuery;
        this.queryConverter = queryConverter;
    }

    protected SlowQueryDatastoreParameters(SlowQueryDatastoreParameters slowQueryDatastoreParameters) {
        super(slowQueryDatastoreParameters);
        this.rawQuery = slowQueryDatastoreParameters.rawQuery;
        this.queryConverter = slowQueryDatastoreParameters.queryConverter;
    }

    /**
     * Returns the raw query object used for processing.
     *
     * @return raw query object
     * @since 3.36.0
     */
    public T getRawQuery() {
        return rawQuery;
    }

    /**
     * Returns the converter implementation used to transform the raw query into a string
     *
     * @return query converter implementation
     * @since 3.36.0
     */
    public QueryConverter getQueryConverter() {
        return queryConverter;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy