cache service: move database updating to happen during download
This commit is contained in:
@@ -264,6 +264,11 @@ public class CacheClient implements AutoCloseable
|
||||
|
||||
logger.info("Index {} has {} archives", i, indexData.getArchives().length);
|
||||
|
||||
if (watcher != null)
|
||||
{
|
||||
watcher.indexComplete(index);
|
||||
}
|
||||
|
||||
for (ArchiveData ad : indexData.getArchives())
|
||||
{
|
||||
Archive existing = index.getArchive(ad.getId());
|
||||
|
||||
@@ -25,9 +25,11 @@
|
||||
package net.runelite.cache.client;
|
||||
|
||||
import net.runelite.cache.fs.Archive;
|
||||
import net.runelite.cache.fs.Index;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface DownloadWatcher
|
||||
{
|
||||
void indexComplete(Index index);
|
||||
|
||||
void downloadComplete(Archive archive, byte[] data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user