code: public synchronized void insert_event(EventData event) {
          events.add(event);
          while (events.size() > max_size)
              events.remove(0);
      }
docs: ==================================================================