code: public synchronized void configure(HistoryKey pKey, HistoryLimit pHistoryLimit) {
          // Remove entries if set to null
          if (pHistoryLimit == null) {
              removeEntries(pKey);
              return;
          }
          HistoryLimit limit = pHistoryLimit.respectGlobalMaxEntries(globalMaxEntries);
  
          if (pKey.isMBeanPattern()) {
              patterns.put(pKey,limit);
              // Trim all already stored keys
              for (HistoryKey key : historyStore.keySet()) {
                  if (pKey.matches(key)) {
                      HistoryEntry entry = historyStore.get(key);
                      entry.setLimit(limit);
                  }
              }
          } else {
              HistoryEntry entry = historyStore.get(pKey);
              if (entry != null) {
                  entry.setLimit(limit);
              } else {
                  entry = new HistoryEntry(limit);
                  historyStore.put(pKey,entry);
              }
          }
      }
docs: Configure the history length for a specific entry. If the length
  is 0 disable history for this key. Please note, that this method might change the limit
  object so the ownership of this object goes over to the callee.
  
  @param pKey history key
  @param pHistoryLimit limit to apply or <code>null</code> if no history should be recored for this entry