@ Deprecated public Decoder < S > getDecoder ( int generation ) throws FetchNoneException , FetchException { try { synchronized ( mLayout ) { IntHashMap decoders = mDecoders ; if ( decoders == null ) { mDecoders = decoders = new IntHashMap ( ) ; } Decoder < S > decoder = ( Decoder < S > ) decoders . get ( generation ) ; if ( decoder == null ) { synchronized ( cCodecDecoders ) { Object altLayoutKey = new LayoutKey ( mLayout . getGeneration ( generation ) ) ; Object key = KeyFactory . createKey // Note: Generation is still required in the key // because an equivalent layout (with different generation) // might have been supplied by Layout.getGeneration. ( new Object [ ] { mCodecKey , generation , altLayoutKey } ) ; decoder = ( Decoder < S > ) cCodecDecoders . get ( key ) ; if ( decoder == null ) { decoder = generateDecoder ( generation ) ; cCodecDecoders . put ( key , decoder ) ; } } mDecoders . put ( generation , decoder ) ; } return decoder ; } } catch ( NullPointerException e ) { if ( mLayout == null ) { throw new FetchNoneException ( "Layout evolution not supported" ) ; } throw e ; } }
Returns a data decoder for the given generation .