1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-15 03:59:38 +02:00

Improve Entity Capabilities code

Most importantly, rename reload() method of persistent cache to
"DiscoverInfo lookup(String nodeVer)" and lazily load the data from the
persistent cache to the memory cache.
This commit is contained in:
Florian Schmaus 2014-05-25 17:49:17 +02:00
parent 47d9146c76
commit 6dd180e9d3
4 changed files with 67 additions and 57 deletions

View file

@ -94,10 +94,7 @@ public class EntityCapsManagerTest {
EntityCapsManager.addDiscoverInfoByNode(nodeVer, di);
// Lose all the data
EntityCapsManager.caps.clear();
// Restore the data from the persistent Cache
cache.replay();
EntityCapsManager.clearMemoryCache();
DiscoverInfo restored_di = EntityCapsManager.getDiscoveryInfoByNodeVer(nodeVer);
assertNotNull(restored_di);