public static void stack(
     final String urlhash,
     final String hostname,
     final byte[] initiatorHash,
     final byte[] executorHash,
     final EventOrigin stackType) {
   // assert initiatorHash != null; // null == proxy !
   assert executorHash != null;
   if (urlhash == null || hostname == null) {
     return;
   }
   try {
     final Map<String, InitExecEntry> resultStack = getStack(stackType);
     if (resultStack != null) {
       resultStack.put(urlhash, new InitExecEntry(initiatorHash, executorHash));
     }
   } catch (final Exception ex) {
     System.out.println("INTERNAL ERROR in newEntry/2: " + ex.toString());
     return;
   }
   try {
     final ScoreMap<String> domains = getDomains(stackType);
     if (domains != null) {
       domains.inc(hostname);
     }
   } catch (final Exception ex) {
     System.out.println("INTERNAL ERROR in newEntry/3: " + ex.toString());
     return;
   }
 }
 public static void clearStack(final EventOrigin stack) {
   final Map<String, InitExecEntry> resultStack = getStack(stack);
   if (resultStack != null) resultStack.clear();
   final ScoreMap<String> resultDomains = getDomains(stack);
   if (resultDomains != null) {
     // we do not clear this completely, just remove most of the less important entries
     resultDomains.shrinkToMaxSize(100);
     resultDomains.shrinkToMinScore(2);
   }
 }
 public static int getDomainListSize(final EventOrigin stack) {
   final ScoreMap<String> domains = getDomains(stack);
   if (domains == null) return 0;
   return domains.size();
 }