class TimelineCollector extends CompositeService {

  public TimelineWriteResponse putDomain(TimelineDomain domain,
      UserGroupInformation callerUgi) throws IOException {
    if (LOG.isDebugEnabled()) {
      LOG.debug(
          "putDomain(domain=" + domain + ", callerUgi=" + callerUgi + ")");
    }

    TimelineWriteResponse response;
    synchronized (writer) {
      final TimelineCollectorContext context = getTimelineEntityContext();
      response = writer.write(context, domain);
      flushBufferedTimelineEntities();
    }

    return response;
  }

  public  TimelineCollector(String name);

}