public void updateDigest ( MessageDigest digest ) { ByteBuffer longBuffer = ByteBuffer . allocate ( 8 ) ; for ( int i = 0 ; i < size ; i ++ ) { for ( int j = 0 ; j < starts [ i ] . size ( ) ; j ++ ) digest . update ( starts [ i ] . get ( j ) . duplicate ( ) ) ; for ( int j = 0 ; j < ends [ i ] . size ( ) ; j ++ ) digest . update ( ends [ i ] . get ( j ) . duplicate ( ) ) ; longBuffer . putLong ( 0 , markedAts [ i ] ) ; digest . update ( longBuffer . array ( ) , 0 , 8 ) ; } }
Calculates digest for triggering read repair on mismatch