private void fail ( final K key ) { final String methodName = "fail(): " ; stateLock . writeLock ( ) . lock ( ) ; try { Integer index = actualIndices . remove ( key ) ; if ( index == null ) throw new IllegalArgumentException ( "unknown key: " + key ) ; elements [ index ] = FAILED ; // register that this key failed ( failedKeys == null ? failedKeys = new ArrayList < K > ( actualIndices . size ( ) + 1 ) : failedKeys ) . add ( key ) ; checkForCompletion ( ) ; if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , methodName , "permanent fail for key " + key ) ; stateLock . postEvent ( ) ; } finally { stateLock . writeLock ( ) . unlock ( ) ; } }
Permanently fail to retrieve the element associated with the key independently of any timeout .