void close ( boolean cleanCache ) { if ( ! this . closed . getAndSet ( true ) ) { // Close storage reader (and thus cancel those reads). if ( cleanCache ) { this . executor . execute ( ( ) -> { removeAllCacheEntries ( ) ; log . info ( "{}: Closed." , this . traceObjectId ) ; } ) ; } else { log . info ( "{}: Closed (no cache cleanup)." , this . traceObjectId ) ; } } }
Closes the SegmentAttributeIndex and optionally cleans the cache .