private V removeNoCopyOrAwait ( K key ) { @ SuppressWarnings ( "unchecked" ) V [ ] removed = ( V [ ] ) new Object [ 1 ] ; cache . asMap ( ) . computeIfPresent ( key , ( k , expirable ) -> { if ( ! expirable . isEternal ( ) && expirable . hasExpired ( currentTimeMillis ( ) ) ) { dispatcher . publishExpired ( this , key , expirable . get ( ) ) ; statistics . recordEvictions ( 1L ) ; return null ; } dispatcher . publishRemoved ( this , key , expirable . get ( ) ) ; removed [ 0 ] = expirable . get ( ) ; return null ; } ) ; return removed [ 0 ] ; }
Removes the mapping from the cache without store - by - value copying nor waiting for synchronous listeners to complete .