public synchronized static void clearObsoleteImageUploads ( long minTxIdToKeep , String journalId ) { for ( Iterator < Map . Entry < Long , SessionDescriptor > > it = sessions . entrySet ( ) . iterator ( ) ; it . hasNext ( ) ; ) { Map . Entry < Long , SessionDescriptor > entry = it . next ( ) ; if ( entry . getValue ( ) . journalId . equals ( journalId ) && entry . getValue ( ) . txid < minTxIdToKeep ) { it . remove ( ) ; } } }
Clean the map from obsolete images .