public void resetOldsBlackListHosts ( ) { long currentTimeNanos = System . nanoTime ( ) ; Set < Map . Entry < HostAddress , Long > > entries = blacklist . entrySet ( ) ; for ( Map . Entry < HostAddress , Long > blEntry : entries ) { long entryNanos = blEntry . getValue ( ) ; long durationSeconds = TimeUnit . NANOSECONDS . toSeconds ( currentTimeNanos - entryNanos ) ; if ( durationSeconds >= urlParser . getOptions ( ) . loadBalanceBlacklistTimeout ) { blacklist . remove ( blEntry . getKey ( ) , entryNanos ) ; } } }
Permit to remove Host to blacklist after loadBalanceBlacklistTimeout seconds .