Package net.sf.logsaw.index

Examples of net.sf.logsaw.index.SynchronizationResult


        /* (non-Javadoc)
         * @see org.eclipse.core.runtime.jobs.JobChangeAdapter#done(org.eclipse.core.runtime.jobs.IJobChangeEvent)
         */
        @Override
        public void done(IJobChangeEvent event) {
          SynchronizationResult result =
            (SynchronizationResult) event.getJob().getProperty(QN_RESULT);
          if (event.getResult().isOK()) {
            callback.doCallback(result);
          } else if (event.getResult().getSeverity() == IStatus.CANCEL) {
            callback.doCallback(result);
View Full Code Here


              Messages.LuceneIndexService_info_autoTruncate_noDateComponent));
        }
       
        // Perform synchronize
        log.synchronize(collector, monitor);
        return new SynchronizationResult(monitor.isCanceled(), collector.getTotalCollected(),
            System.currentTimeMillis() - startTime, collector.getMessages());
      }
    };
    return runnable.runWithIndexWriter(log, getAnalyzer(), getMatchVersion());
  }
View Full Code Here

      loadLogFile("no-timestamp.log.txt");
      createLogResourceWithPK("UTF-8", Locale.getDefault(), getTimeZone());
      APatternDialect dialect = (APatternDialect) getLogResource().getDialect();
      dialect.configure(APatternDialect.OPTION_PATTERN, "%p %t %c - %m%n");
      IIndexService indexService = IndexPlugin.getDefault().getIndexService();
      SynchronizationResult result = indexService.synchronize(getLogResource(), null);
      assertEquals(15, result.getNumberOfEntriesAdded());
      assertEquals(15, indexService.count(getLogResource()));
      result = indexService.synchronize(getLogResource(), null);
      assertEquals(15, result.getNumberOfEntriesAdded());
      assertEquals(15, indexService.count(getLogResource()));
    } catch (Exception e) {
      getLogger().error(e.getLocalizedMessage(), e);
      fail("Exception should not occur: " + e.getLocalizedMessage());
    }
View Full Code Here

TOP

Related Classes of net.sf.logsaw.index.SynchronizationResult

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.