Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
*
* * 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 datastore on the {@link TracedMethod}. A fluent builder is provided to
* allow for easy usage and management of this API.
*
* @since 3.36.0
*/
public class DatastoreParameters implements ExternalParameters {
/**
* The name of the vendor or driver.
*/
private final String product;
/**
* The name of the collection or table.
*/
private final String collection;
/**
* The name of the datastore operation. This should be the primitive operation type accepted by the datastore itself
* or the name of the API method in the client library.
*/
private final String operation;
/**
* The host where the datastore is located.
*/
private final String host;
/**
* The port for the connection to the datastore.
*/
private final Integer port;
/**
* The path or identifier of this instance.
*/
private final String pathOrId;
/**
* The database name.
*/
private final String databaseName;
private DatastoreParameters(String product, String collection, String operation, String host, Integer port,
String pathOrId, String databaseName) {
this.product = product;
this.collection = collection;
this.operation = operation;
this.host = host;
this.port = port;
this.pathOrId = pathOrId;
this.databaseName = databaseName;
}
protected DatastoreParameters(DatastoreParameters datastoreParameters) {
this.product = datastoreParameters.product;
this.collection = datastoreParameters.collection;
this.operation = datastoreParameters.operation;
this.host = datastoreParameters.host;
this.port = datastoreParameters.port;
this.pathOrId = datastoreParameters.pathOrId;
this.databaseName = datastoreParameters.databaseName;
}
protected static class Builder implements CollectionParameter, OperationParameter, InstanceParameter,
DatabaseParameter, SlowQueryParameter, SlowQueryWithInputParameter, Build {
private String product;
private String collection;
private String operation;
private String host = null;
private Integer port = null;
private String pathOrId = null;
private String databaseName = null;
/**
* Used for {@link SlowQueryDatastoreParameters}. The builder method below gives us type safety here.
*/
private Object rawQuery = null;
private QueryConverter