class TimelineCollector extends CompositeService {

  public TimelineWriteResponse putEntities(TimelineEntities entities,
      UserGroupInformation callerUgi) throws IOException {
    if (LOG.isDebugEnabled()) {
      LOG.debug("putEntities(entities=" + entities + ", callerUgi="
          + callerUgi + ")");
    }

    TimelineWriteResponse response;
    // synchronize on the writer object so that no other threads can
    // flush the writer buffer concurrently and swallow any exception
    // caused by the timeline enitites that are being put here.
    synchronized (writer) {
      response = writeTimelineEntities(entities, callerUgi);
      flushBufferedTimelineEntities();
    }

    return response;
  }

  public  TimelineCollector(String name);

}