StorageInfo
Stay organized with collections
Save and categorize content based on your preferences.
The response class of AppSearchClient#getStorageInfo
.
Inherited Constant Summary
From interface android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
Public Method Summary
int |
|
int |
getAliveNamespacesCount
() Returns the number of namespaces that have at least one alive document in the
current session's database.
|
long |
getSizeBytes
() Returns the estimated size of the session's database in bytes.
|
void |
|
Inherited Method Summary
From class java.lang.Object
From interface android.os.Parcelable
abstract int |
describeContents
()
|
abstract void |
writeToParcel
( Parcel
arg0,
int arg1)
|
Public Methods
public int
getAliveDocumentsCount
()
public int
getAliveNamespacesCount
()
Returns the number of namespaces that have at least one alive document in the
current session's database.
Alive documents are documents that haven't been deleted and haven't exceeded the ttl
as set in GenericDocument.Builder.setTtlMillis(long)
.
public long
getSizeBytes
()
Returns the estimated size of the session's database in bytes.
public void
writeToParcel
( Parcel
dest, int
flags)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eStorageInfo\u003c/code\u003e provides statistics about the AppSearch session's storage, such as document and namespace counts, and database size.\u003c/p\u003e\n"],["\u003cp\u003eIt's the response class for \u003ccode\u003eAppSearchClient#getStorageInfo\u003c/code\u003e, giving insights into the current state of the AppSearch data.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use \u003ccode\u003eStorageInfo\u003c/code\u003e to understand storage usage and potentially optimize their AppSearch implementation.\u003c/p\u003e\n"],["\u003cp\u003eThis class includes methods like \u003ccode\u003egetAliveDocumentsCount\u003c/code\u003e, \u003ccode\u003egetAliveNamespacesCount\u003c/code\u003e, and \u003ccode\u003egetSizeBytes\u003c/code\u003e to retrieve specific storage metrics.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eStorageInfo\u003c/code\u003e is Parcelable, making it suitable for transferring data between components or processes within an Android application.\u003c/p\u003e\n"]]],["`StorageInfo` provides data about the state of an AppSearch session. Key information includes `getAliveDocumentsCount`, which returns the number of undeleted, non-expired documents; `getAliveNamespacesCount`, which indicates how many namespaces contain these alive documents; and `getSizeBytes`, which shows the estimated database size. Additionally, the `CREATOR` field and `writeToParcel` method are available for implementing Parcelable functionalities. A `StorageInfo.Builder` nested class facilitates object creation.\n"],null,["# StorageInfo\n\npublic final class **StorageInfo** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nimplements [Parcelable](//developer.android.com/reference/android/os/Parcelable.html) \nThe response class of `AppSearchClient#getStorageInfo`. \n\n### Nested Class Summary\n\n|-------|---|---|-----------------------------------------------------------------------------------------------------|\n| class | [StorageInfo.Builder](/android/reference/com/google/android/gms/appsearch/StorageInfo.Builder) || Builder for [StorageInfo](/android/reference/com/google/android/gms/appsearch/StorageInfo) objects. |\n\n### Inherited Constant Summary\n\nFrom interface android.os.Parcelable \n\n|-----|-------------------------------|---|\n| int | CONTENTS_FILE_DESCRIPTOR | |\n| int | PARCELABLE_WRITE_RETURN_VALUE | |\n\n### Field Summary\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------|---|\n| public static final [Creator](//developer.android.com/reference/android/os/Parcelable.Creator.html)\\\u003c[StorageInfo](/android/reference/com/google/android/gms/appsearch/StorageInfo)\\\u003e | [CREATOR](/android/reference/com/google/android/gms/appsearch/StorageInfo#CREATOR) | |\n\n### Public Method Summary\n\n|------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| int | [getAliveDocumentsCount](/android/reference/com/google/android/gms/appsearch/StorageInfo#getAliveDocumentsCount())() Returns the number of alive documents in the current session. |\n| int | [getAliveNamespacesCount](/android/reference/com/google/android/gms/appsearch/StorageInfo#getAliveNamespacesCount())() Returns the number of namespaces that have at least one alive document in the current session's database. |\n| long | [getSizeBytes](/android/reference/com/google/android/gms/appsearch/StorageInfo#getSizeBytes())() Returns the estimated size of the session's database in bytes. |\n| void | [writeToParcel](/android/reference/com/google/android/gms/appsearch/StorageInfo#writeToParcel(android.os.Parcel,%20int))([Parcel](//developer.android.com/reference/android/os/Parcel.html) dest, int flags) |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nFrom interface android.os.Parcelable \n\n|---------------|--------------------------------------------------------------------------------------------------|\n| abstract int | describeContents() |\n| abstract void | writeToParcel([Parcel](//developer.android.com/reference/android/os/Parcel.html) arg0, int arg1) |\n\nFields\n------\n\n#### public static final [Creator](//developer.android.com/reference/android/os/Parcelable.Creator.html)\\\u003c[StorageInfo](/android/reference/com/google/android/gms/appsearch/StorageInfo)\\\u003e\n**CREATOR**\n\nPublic Methods\n--------------\n\n#### public int **getAliveDocumentsCount** ()\n\nReturns the number of alive documents in the current session.\n\nAlive documents are documents that haven't been deleted and haven't exceeded the ttl\nas set in [GenericDocument.Builder.setTtlMillis(long)](/android/reference/com/google/android/gms/appsearch/GenericDocument.Builder#setTtlMillis(long)). \n\n#### public int **getAliveNamespacesCount** ()\n\nReturns the number of namespaces that have at least one alive document in the\ncurrent session's database.\n\nAlive documents are documents that haven't been deleted and haven't exceeded the ttl\nas set in [GenericDocument.Builder.setTtlMillis(long)](/android/reference/com/google/android/gms/appsearch/GenericDocument.Builder#setTtlMillis(long)). \n\n#### public long **getSizeBytes** ()\n\nReturns the estimated size of the session's database in bytes. \n\n#### public void **writeToParcel** ([Parcel](//developer.android.com/reference/android/os/Parcel.html) dest, int flags)"]]