android-priority-jobqueue icon indicating copy to clipboard operation
android-priority-jobqueue copied to clipboard

Deleting the Java Class of a persisted Job in new versions

Open kgrashad opened this issue 8 years ago • 1 comments

What happens if I delete a Job class in a newer version of my app that was persisted in previous versions. Could this cause any problems if the queue tries to load the job and no longer finds the matching type? Do I need to add some logic to handle it?

kgrashad avatar Sep 18 '17 19:09 kgrashad

This library uses Java Serialization by default to serialize jobs and saves it db and file storage. Your job's configuration parameters and few other things are stored sqlite db, and your job Object is serialized and saved as a file in apps internal storage. If library is not able to deserialize job due to any reasons (Ex: deletion of job class or modification of job class), Job will deleted from internal storage and its configuration will be deleted from sqlite db.

Check this for more details : https://github.com/yigit/android-priority-jobqueue/blob/2f4079c24381c3c8c55f4d179194a59f6b9b55d0/jobqueue/src/main/java/com/birbit/android/jobqueue/persistentQueue/sqlite/SqliteJobQueue.java#L290-L315

kalpeshp0310 avatar Oct 29 '17 12:10 kalpeshp0310