code: public synchronized int getSize() {
          try {
              ByteArrayOutputStream bOut = new ByteArrayOutputStream();
              ObjectOutputStream oOut = new ObjectOutputStream(bOut);
              oOut.writeObject(historyStore);
              bOut.close();
              return bOut.size();
          } catch (IOException e) {
              throw new IllegalStateException("Cannot serialize internal store: " + e,e);
          }
      }
docs: Get the size of this history store in bytes
  
  @return size in bytes