Map < Segment , Long > acquireNewSegmentsIfNeeded ( long timeLag ) throws ReaderNotInReaderGroupException { fetchUpdatesIfNeeded ( ) ; if ( shouldAcquireSegment ( ) ) { return acquireSegment ( timeLag ) ; } else { return Collections . emptyMap ( ) ; } }
If there are unassigned segments and this host has not acquired one in a while acquires them .