Contains information about a schema change detected by an ObserverCallback
.
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 via DocumentChangeInfo
.
The only notification will be of the schema type change via SchemaChangeInfo
.
Depending on your use case, you may need to re-query the whole schema type when this
happens.
Public Constructor Summary
SchemaChangeInfo(String packageName,
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 |
hashCode()
|
String |
toString()
|
Inherited Method Summary
Public Constructors
public SchemaChangeInfo (String packageName, String databaseName, Set<String> changedSchemaNames)
Constructs a new SchemaChangeInfo
.
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 boolean equals (Object o)
public Set<String> getChangedSchemaNames ()
Returns the names of schema types affected by this change notification.
This will never be empty.
public String getDatabaseName ()
Returns the database in which the schema that was changed resides.
public String getPackageName ()
Returns the package name of the app which owns the schema that changed.