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:
parent
47d9146c76
commit
6dd180e9d3
4 changed files with 67 additions and 57 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue