Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

28
LINES

< > BotCompany Repo | #1011311 // allWebsByID [cached from index]

JavaX fragment (include)

static DependentCache<SmallestListMultiMap<GlobalID, Web>> allWebsByID_cache = new DependentCache(f allWebsByID_calc, f cachedNodeIndex /*_changeCount*/);

static SmallestListMultiMap<GlobalID, Web> allWebsByID() {
  ret allWebsByID_cache!;
}

static SmallestListMultiMap<GlobalID, Web> allWebsByID_calc() {
  setAdd(postSoftwareMadeWeb_onNewWeb, f allWebsByID_onNewWeb);
  onTransientWebAdded_do(f allWebsByID_onNewWeb);
  onTransientWebRemoved_do(f allWebsByID_onRemovedWeb);
  ret smallestListMultiMapIndexByMethod(allWebsFromCachedNodeIndex_uncached(), 'globalIDObj);
}

svoid allWebsByID_onNewWeb(Web web, O[] params) {
  allWebsByID_onNewWeb(web);
}

svoid allWebsByID_onNewWeb(Web web) {
  lock allWebsByID_cache.lock;
  if (allWebsByID_cache! != null)
    allWebsByID_cache->put(web.globalIDObj(), web);
}

svoid allWebsByID_onRemovedWeb(Web web) {
  lock allWebsByID_cache.lock;
  if (allWebsByID_cache! != null)
    allWebsByID_cache->remove(web.globalIDObj());
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1011311
Snippet name: allWebsByID [cached from index]
Eternal ID of this version: #1011311/20
Text MD5: b7a90153a09ffdf161583983f1afaba6
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-27 11:07:18
Source code size: 1000 bytes / 28 lines
Pitched / IR pitched: No / No
Views / Downloads: 578 / 601
Version history: 19 change(s)
Referenced in: [show references]