Package com.baulsupp.kolja.log.line

Examples of com.baulsupp.kolja.log.line.LineIndex


  public void process(File file, IntRange intRange) throws Exception {

    LineIterator lineIterator;
    if (requiresRandomAccess()) {
      LineIndex li = lineIndexFactory.buildLineIndex(file, format);

      if (showRequests) {
        RequestIndex requestIndex = format.getRequestIndex(li);
        setRequestIndex(requestIndex);
      }
View Full Code Here


  public void process(File file, LongRange intRange) throws Exception {
    log.info("Processing file " + intRange);

    LineIterator lineIterator;
    if (requiresRandomAccess()) {
      LineIndex li = lineIndexFactory.buildLineIndex(file, format);

      if (showRequests) {
        RequestIndex requestIndex = format.getRequestIndex(li);
        setRequestIndex(requestIndex);
      }
View Full Code Here

public class DefaultLineIndexFactory implements LineIndexFactory {

  public LineIndex buildLineIndex(File file, LogFormat format) throws IOException {
    WrappedCharBuffer buffer = WrappedCharBuffer.fromFile(file);

    LineIndex li = format.getLineIndex(buffer);
    return li;
  }
View Full Code Here

    }
    return bli;
  }

  public static Iterator<Line> loadLineIterator(LogFormat format, CharSequence sequence) {
    LineIndex lineIndex = format.getLineIndex(sequence);

    return new BasicLineIterator(lineIndex);
  }
View Full Code Here

public class DefaultLineIndexFactory implements LineIndexFactory {

  public LineIndex buildLineIndex(File file, LogFormat format) throws IOException {
    WrappedCharBuffer buffer = WrappedCharBuffer.fromFile(file);

    LineIndex li = format.getLineIndex(buffer);
    return li;
  }
View Full Code Here

  public static CharSequence fromFile(File file) throws IOException {
    return ReloadableCharBuffer.fromFileReloadable(file);
  }

  public static Iterator<Line> loadByRequests(CharSequence buffer, LogFormat format) {
    LineIndex lineIndex = format.getLineIndex(buffer);

    StandardRequestIndex requestIndex = format.getRequestIndex(lineIndex);

    return new BasicLineIterator(requestIndex);
  }
View Full Code Here

    return new BasicLineIterator(requestIndex);
  }

  @Deprecated
  public static BasicLineIterator load(CharSequence buffer, LogFormat format) {
    LineIndex lineIndex = format.getLineIndex(buffer);

    return new BasicLineIterator(lineIndex);
  }
View Full Code Here

    }
    return bli;
  }

  public static Iterator<Line> loadLineIterator(LogFormat format, CharSequence sequence) {
    LineIndex lineIndex = format.getLineIndex(sequence);

    return new BasicLineIterator(lineIndex);
  }
View Full Code Here

  }

  private void loadIndexes(LogFormat format) {
    models = new ArrayList<LineIndex>();
   
    LineIndex li = format.getLineIndex(buffer);
    models.add(li);

    if (format.supportsEvents()) {
      eventList = format.getEventList(li);
      li.addLineListener(eventList);
    }

    // TODO move filtering to config and allow choices
    Filter filter = new PriorityFilter();
    LineIndex filteredIndex = new FilteredLineIndex(li, filter);
    models.add(filteredIndex);

    if (format.supportsRequests()) {
      requestIndex = format.getRequestIndex(li);
    }
View Full Code Here

      search.setModel(new LineIndexItemModel(new BasicLineIterator(currentIndex)));
    }
  }

  LineIndex getNextLineModel() {
    LineIndex li = (LineIndex) models.remove(0);
    models.add(li);

    return li;
  }
View Full Code Here

TOP

Related Classes of com.baulsupp.kolja.log.line.LineIndex

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.