public class

CallStats.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.appsearch.localstorage.stats.CallStats.Builder

Overview

Builder for CallStats.

Summary

Constructors
publicBuilder()

Methods
public CallStatsbuild()

Creates CallStats object from CallStats.Builder instance.

public CallStats.BuildersetCallType(int callType)

Sets type of the call.

public CallStats.BuildersetDatabase(java.lang.String database)

Sets the database used by the session.

public CallStats.BuildersetEstimatedBinderLatencyMillis(int estimatedBinderLatencyMillis)

Sets estimated binder latency, in milliseconds.

public CallStats.BuildersetNumOperationsFailed(int numOperationsFailed)

Sets number of operations failed.

public CallStats.BuildersetNumOperationsSucceeded(int numOperationsSucceeded)

Sets number of operations succeeded.

public CallStats.BuildersetPackageName(java.lang.String packageName)

Sets the PackageName used by the session.

public CallStats.BuildersetStatusCode(int statusCode)

Sets the status code.

public CallStats.BuildersetTotalLatencyMillis(int totalLatencyMillis)

Sets total latency in millis.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Methods

public CallStats.Builder setPackageName(java.lang.String packageName)

Sets the PackageName used by the session.

public CallStats.Builder setDatabase(java.lang.String database)

Sets the database used by the session.

public CallStats.Builder setStatusCode(int statusCode)

Sets the status code.

public CallStats.Builder setTotalLatencyMillis(int totalLatencyMillis)

Sets total latency in millis.

public CallStats.Builder setCallType(int callType)

Sets type of the call.

public CallStats.Builder setEstimatedBinderLatencyMillis(int estimatedBinderLatencyMillis)

Sets estimated binder latency, in milliseconds.

public CallStats.Builder setNumOperationsSucceeded(int numOperationsSucceeded)

Sets number of operations succeeded.

For example, for AppSearchSession.putAsync(PutDocumentsRequest), it is the total number of individual successful put operations. In this case, how many documents are successfully indexed.

For non-batch calls such as AppSearchSession.setSchemaAsync(SetSchemaRequest), the sum of CallStats.getNumOperationsSucceeded() and CallStats.getNumOperationsFailed() is always 1 since there is only one operation.

public CallStats.Builder setNumOperationsFailed(int numOperationsFailed)

Sets number of operations failed.

For example, for AppSearchSession.putAsync(PutDocumentsRequest), it is the total number of individual failed put operations. In this case, how many documents are failed to be indexed.

For non-batch calls such as AppSearchSession.setSchemaAsync(SetSchemaRequest), the sum of CallStats.getNumOperationsSucceeded() and CallStats.getNumOperationsFailed() is always 1 since there is only one operation.

public CallStats build()

Creates CallStats object from CallStats.Builder instance.