AI-generated Key Takeaways
-
The
NodeClient.OnNodeMigratedListenerinterface receives events after a node migration has successfully finished. -
The
onNodeMigratedmethod is called to notify when a watch has migrated from a previous phone to the current phone. -
The
onNodeMigratedmethod provides the node ID of the migrating watch and an archive of data items from the previous phone. -
After
onNodeMigratedcompletes, the data buffer is released, and any data items need to be frozen to be used afterward.
| Known Indirect Subclasses |
Receives events after a node migration has successfully finished.
Public Method Summary
| abstract void |
onNodeMigrated(String nodeId,
DataItemBuffer
archive)
Notification that a watch has migrated from a previous phone to this phone.
|
Public Methods
public abstract void onNodeMigrated (String nodeId, DataItemBuffer archive)
Notification that a watch has migrated from a previous phone to this phone.
This notification contains an archive of the data items written by the previous phone. You may inspect the data items in the archive and integrate them into your own data items.
After this method completes, the data buffer is
released and any data items it contains become invalid. You should
freeze
any data items that you wish to use after the callback completes.
You may want to filter the archive data items by path during this callback, freezing a subset of them into a temporary collection, and then schedule the work of processing and saving your data into a worker thread.
Parameters
| nodeId | nodeId of the migrating watch. |
|---|---|
| archive | the archive of DataItems
from the previous phone. |