class EntryBasedLogPruningStrategy implements CoreLogPruningStrategy {

    @Override
    public long getIndexToKeep( Segments segments )
    {
        SegmentVisitor visitor = new SegmentVisitor();
        segments.visitBackwards( visitor );

        if ( visitor.visitedCount == 0 )
        {
            log.warn( "No log files found during the prune operation. This state should resolve on its own, but" +
                      " if this warning continues, you may want to look for other errors in the user log." );
        }

        return visitor.prevIndex;
    }

      EntryBasedLogPruningStrategy( long entriesToKeep, LogProvider logProvider );

}