private Socket evictOldest ( ) { Iterator < Entry < SocketAddress , Socket > > iter = multimap . entries ( ) . iterator ( ) ; if ( ! iter . hasNext ( ) ) { throw new IllegalArgumentException ( "Cannot evict from empty cache!" ) ; } Entry < SocketAddress , Socket > entry = iter . next ( ) ; iter . remove ( ) ; return entry . getValue ( ) ; }
Evict the oldest entry in the cache .