question: private void repin ( ) { if ( logger . isLoggable ( Level . WARNING ) ) logger . warning ( "Tx." + txNum + " is re-pinning all buffers" ) ; try { List < BlockId > blksToBeRepinned = new LinkedList < BlockId > ( ) ; Map < BlockId , Integer > pinCounts = new HashMap < BlockId , Integer > ( ) ; List < Buffer > buffersToBeUnpinned = new LinkedList < Buffer > ( ) ; for ( Entry < BlockId , PinnedBuffer > entry : pinnedBuffers . entrySet ( ) ) { blksToBeRepinned . add ( entry . getKey ( ) ) ; pinCounts . put ( entry . getKey ( ) , entry . getValue ( ) . pinnedCount ) ; buffersToBeUnpinned . add ( entry . getValue ( ) . buffer ) ; } for ( Buffer buf : buffersToBeUnpinned ) unpin ( buf ) ; synchronized ( bufferPool ) { bufferPool . wait ( MAX_TIME ) ; } for ( BlockId blk : blksToBeRepinned ) pin ( blk ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } }
target:  Unpins all currently pinned buffers of the calling transaction and repins them.