SchemaChangeInfo

public final classSchemaChangeInfoextendsObject

Contains information about a schema change detected by anObserverCallback.

This object will be sent when a schema type having a name matching an observer's schema filters (as determined by ObserverSpec.getFilterSchemas()) has been added, updated, or removed.

Note that schema changes may cause documents to be migrated or removed. When this happens, individual document updates will NOT be dispatched viaDocumentChangeInfo. The only notification will be of the schema type change viaSchemaChangeInfo. Depending on your use case, you may need to re-query the whole schema type when this happens.

Public Constructor Summary

SchemaChangeInfo(StringpackageName, String databaseName,Set<String> changedSchemaNames)
Constructs a new SchemaChangeInfo.

Public Method Summary

boolean
Set<String>
getChangedSchemaNames()
Returns the names of schema types affected by this change notification.
String
getDatabaseName()
Returns the database in which the schema that was changed resides.
String
getPackageName()
Returns the package name of the app which owns the schema that changed.
int
String

Inherited Method Summary

Public Constructors

publicSchemaChangeInfo(StringpackageName,StringdatabaseName,Set<String> changedSchemaNames)

Constructs a newSchemaChangeInfo.

Parameters
packageName The package name of the app which owns the schema that changed.
databaseName The database in which the schema that changed resides.
changedSchemaNames Names of schemas that have changed as part of this notification.

Public Methods

public booleanequals(Objecto)

publicSet<String> getChangedSchemaNames()

Returns the names of schema types affected by this change notification.

This will never be empty.

publicStringgetDatabaseName()

Returns the database in which the schema that was changed resides.

publicStringgetPackageName()

Returns the package name of the app which owns the schema that changed.

public inthashCode()

publicStringtoString()