docs: protected List<StatsStorageEvent> checkStorageEvents(Persistable p) {
          if (listeners.isEmpty())
              return null;
  
          int count = 0;
          StatsStorageEvent newSID = null;
          StatsStorageEvent newTID = null;
          StatsStorageEvent newWID = null;
  
          //Is this a new session ID?
          if (!sessionIDs.contains(p.getSessionID())) {
              newSID = new StatsStorageEvent(this, StatsStorageListener.EventType.NewSessionID, p.getSessionID(),
                              p.getTypeID(), p.getWorkerID(), p.getTimeStamp());
              count++;
          }
  
          //Check for new type and worker IDs
          //TODO probably more efficient way to do this
          boolean foundTypeId = false;
          boolean foundWorkerId = false;
          String typeId = p.getTypeID();
          String wid = p.getWorkerID();
          for (SessionTypeId ts : storageMetaData.keySet()) {
              if (typeId.equals(ts.getTypeID())) {
                  foundTypeId = true;
                  break;
              }
          }
          for (SessionTypeWorkerId stw : staticInfo.keySet()) {
              if (!foundTypeId && typeId.equals(stw.getTypeID())) {
                  foundTypeId = true;
              }
              if (!foundWorkerId && wid.equals(stw.getWorkerID())) {
                  foundWorkerId = true;
              }
              if (foundTypeId && foundWorkerId)
                  break;
          }
          if (!foundTypeId || !foundWorkerId) {
              for (SessionTypeWorkerId stw : updates.keySet()) {
                  if (!foundTypeId && typeId.equals(stw.getTypeID())) {
                      foundTypeId = true;
                  }
                  if (!foundWorkerId && wid.equals(stw.getWorkerID())) {
                      foundWorkerId = true;
                  }
                  if (foundTypeId && foundWorkerId)
                      break;
              }
          }
          if (!foundTypeId) {
              //New type ID
              newTID = new StatsStorageEvent(this, StatsStorageListener.EventType.NewTypeID, p.getSessionID(),
                              p.getTypeID(), p.getWorkerID(), p.getTimeStamp());
              count++;
          }
          if (!foundWorkerId) {
              //New worker ID
              newWID = new StatsStorageEvent(this, StatsStorageListener.EventType.NewWorkerID, p.getSessionID(),
                              p.getTypeID(), p.getWorkerID(), p.getTimeStamp());
              count++;
          }
          if (count == 0)
              return null;
          List<StatsStorageEvent> sses = new ArrayList<>(count);
          if (newSID != null)
              sses.add(newSID);
          if (newTID != null)
              sses.add(newTID);
          if (newWID != null)
              sses.add(newWID);
          return sses;
      }