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