public class

InitializeStats.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.appsearch.localstorage.stats.InitializeStats.Builder

Overview

Builder for InitializeStats.

Summary

Constructors
publicBuilder()

Methods
public InitializeStatsbuild()

Constructs a new InitializeStats from the contents of this InitializeStats.Builder

public InitializeStats.BuildersetDocumentCount(int numDocuments)

Sets number of documents currently in document store.

public InitializeStats.BuildersetDocumentStoreDataStatus(int documentStoreDataStatus)

Sets Native Document Store Data status.

public InitializeStats.BuildersetDocumentStoreRecoveryCause(int documentStoreRecoveryCause)

Sets recovery cause for document store.

public InitializeStats.BuildersetDocumentStoreRecoveryLatencyMillis(int documentStoreRecoveryLatencyMillis)

Sets time used to recover the document store.

public InitializeStats.BuildersetHasDeSync(boolean hasDeSync)

Sets whether the initialize() detects deSync.

public InitializeStats.BuildersetHasReset(boolean hasReset)

Sets whether we had to reset the index, losing all data, as part of initialization.

public InitializeStats.BuildersetIndexRestorationCause(int indexRestorationCause)

Sets restoration cause for index store.

public InitializeStats.BuildersetIndexRestorationLatencyMillis(int indexRestorationLatencyMillis)

Sets time used to restore the index.

public InitializeStats.BuildersetNativeLatencyMillis(int nativeLatencyMillis)

Sets overall time used for the native function call.

public InitializeStats.BuildersetPrepareSchemaAndNamespacesLatencyMillis(int prepareSchemaAndNamespacesLatencyMillis)

Sets time used to read and process the schema and namespaces.

public InitializeStats.BuildersetPrepareVisibilityStoreLatencyMillis(int prepareVisibilityStoreLatencyMillis)

Sets time used to read and process the visibility file.

public InitializeStats.BuildersetResetStatusCode(int resetStatusCode)

Sets the status of the reset, if one was performed according to InitializeStats.Builder.setHasReset(boolean).

public InitializeStats.BuildersetSchemaStoreRecoveryCause(int schemaStoreRecoveryCause)

Returns recovery cause for schema store.

public InitializeStats.BuildersetSchemaStoreRecoveryLatencyMillis(int schemaStoreRecoveryLatencyMillis)

Sets time used to recover the schema store.

public InitializeStats.BuildersetSchemaTypeCount(int numSchemaTypes)

Sets number of schema types currently in the schema store.

public InitializeStats.BuildersetStatusCode(int statusCode)

Sets the status of the initialization.

public InitializeStats.BuildersetTotalLatencyMillis(int totalLatencyMillis)

Sets the total latency of the initialization in milliseconds.

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

Constructors

public Builder()

Methods

public InitializeStats.Builder setStatusCode(int statusCode)

Sets the status of the initialization.

public InitializeStats.Builder setTotalLatencyMillis(int totalLatencyMillis)

Sets the total latency of the initialization in milliseconds.

public InitializeStats.Builder setHasDeSync(boolean hasDeSync)

Sets whether the initialize() detects deSync.

If there is a deSync, it means AppSearch and IcingSearchEngine have an inconsistent view of what data should exist.

public InitializeStats.Builder setPrepareSchemaAndNamespacesLatencyMillis(int prepareSchemaAndNamespacesLatencyMillis)

Sets time used to read and process the schema and namespaces.

public InitializeStats.Builder setPrepareVisibilityStoreLatencyMillis(int prepareVisibilityStoreLatencyMillis)

Sets time used to read and process the visibility file.

public InitializeStats.Builder setNativeLatencyMillis(int nativeLatencyMillis)

Sets overall time used for the native function call.

public InitializeStats.Builder setDocumentStoreRecoveryCause(int documentStoreRecoveryCause)

Sets recovery cause for document store.

Possible recovery causes for document store:

  • InitializeStats.RECOVERY_CAUSE_DATA_LOSS
  • InitializeStats.RECOVERY_CAUSE_TOTAL_CHECKSUM_MISMATCH
  • InitializeStats.RECOVERY_CAUSE_IO_ERROR

    public InitializeStats.Builder setIndexRestorationCause(int indexRestorationCause)

    Sets restoration cause for index store.

    Possible causes:

  • InitializeStats.DOCUMENT_STORE_DATA_STATUS_COMPLETE_LOSS
  • InitializeStats.RECOVERY_CAUSE_TOTAL_CHECKSUM_MISMATCH
  • InitializeStats.RECOVERY_CAUSE_IO_ERROR

    public InitializeStats.Builder setSchemaStoreRecoveryCause(int schemaStoreRecoveryCause)

    Returns recovery cause for schema store.

    Possible causes:

  • InitializeStats.RECOVERY_CAUSE_IO_ERROR

    public InitializeStats.Builder setDocumentStoreRecoveryLatencyMillis(int documentStoreRecoveryLatencyMillis)

    Sets time used to recover the document store.

    public InitializeStats.Builder setIndexRestorationLatencyMillis(int indexRestorationLatencyMillis)

    Sets time used to restore the index.

    public InitializeStats.Builder setSchemaStoreRecoveryLatencyMillis(int schemaStoreRecoveryLatencyMillis)

    Sets time used to recover the schema store.

    public InitializeStats.Builder setDocumentStoreDataStatus(int documentStoreDataStatus)

    Sets Native Document Store Data status. status is defined in external/icing/proto/icing/proto/logging.proto

    public InitializeStats.Builder setDocumentCount(int numDocuments)

    Sets number of documents currently in document store. Those may include alive, deleted, and expired documents.

    public InitializeStats.Builder setSchemaTypeCount(int numSchemaTypes)

    Sets number of schema types currently in the schema store.

    public InitializeStats.Builder setHasReset(boolean hasReset)

    Sets whether we had to reset the index, losing all data, as part of initialization.

    public InitializeStats.Builder setResetStatusCode(int resetStatusCode)

    Sets the status of the reset, if one was performed according to InitializeStats.Builder.setHasReset(boolean).

    public InitializeStats build()

    Constructs a new InitializeStats from the contents of this InitializeStats.Builder