code: public boolean isCompactable(long index) {
      Map.Entry<Long, JournalSegment<E>> segmentEntry = segments.floorEntry(index);
      return segmentEntry != null && segments.headMap(segmentEntry.getValue().index()).size() > 0;
    }
docs: Returns a boolean indicating whether a segment can be removed from the journal prior to the given index.
  
  @param index the index from which to remove segments
  @return indicates whether a segment can be removed from the journal