static void cacheAddressArray( NbtAddress[] addrs ) { if( CACHE_POLICY == 0 ) { return; } long expiration = -1; if( CACHE_POLICY != FOREVER ) { expiration = System.currentTimeMillis() + CACHE_POLICY * 1000; } synchronized( ADDRESS_CACHE ) { for( int i = 0; i < addrs.length; i++ ) { CacheEntry entry = (CacheEntry)ADDRESS_CACHE.get( addrs[i].hostName ); if( entry == null ) { entry = new CacheEntry( addrs[i].hostName, addrs[i], expiration ); ADDRESS_CACHE.put( addrs[i].hostName, entry ); } else { entry.address = addrs[i]; entry.expiration = expiration; } } } } static NbtAddress getCachedAddress( Name hostName ) {
static void cacheAddressArray( NbtAddress[] addrs ) { if( CACHE_POLICY == 0 ) { return; } long expiration = -1; if( CACHE_POLICY != FOREVER ) { expiration = System.currentTimeMillis() + CACHE_POLICY * 1000; } synchronized( ADDRESS_CACHE ) { for( int i = 0; i < addrs.length; i++ ) { CacheEntry entry = (CacheEntry)ADDRESS_CACHE.get( addrs[i].hostName ); if( entry == null ) { entry = new CacheEntry( addrs[i].hostName, addrs[i], expiration ); ADDRESS_CACHE.put( addrs[i].hostName, entry ); } else { entry.address = addrs[i]; entry.expiration = expiration; } } } } static NbtAddress getCachedAddress( Name hostName ) {
static void cacheAddressArray( NbtAddress[] addrs ) { if( CACHE_POLICY == 0 ) { return; } long expiration = -1; if( CACHE_POLICY != FOREVER ) { expiration = System.currentTimeMillis() + CACHE_POLICY * 1000; } synchronized( ADDRESS_CACHE ) { for( int i = 0; i < addrs.length; i++ ) { CacheEntry entry = (CacheEntry)ADDRESS_CACHE.get( addrs[i].hostName ); if( entry == null ) { entry = new CacheEntry( addrs[i].hostName, addrs[i], expiration ); ADDRESS_CACHE.put( addrs[i].hostName, entry ); } else { entry.address = addrs[i]; entry.expiration = expiration; } } } } static NbtAddress getCachedAddress( Name hostName ) {
static void cacheAddressArray( NbtAddress[] addrs ) { if( CACHE_POLICY == 0 ) { return; } long expiration = -1; if( CACHE_POLICY != FOREVER ) { expiration = System.currentTimeMillis() + CACHE_POLICY * 1000; } synchronized( ADDRESS_CACHE ) { for( int i = 0; i < addrs.length; i++ ) { CacheEntry entry = (CacheEntry)ADDRESS_CACHE.get( addrs[i].hostName ); if( entry == null ) { entry = new CacheEntry( addrs[i].hostName, addrs[i], expiration ); ADDRESS_CACHE.put( addrs[i].hostName, entry ); } else { entry.address = addrs[i]; entry.expiration = expiration; } } } } static NbtAddress getCachedAddress( Name hostName ) {
static void cacheAddress( Name hostName, NbtAddress addr, long expiration ) { if( CACHE_POLICY == 0 ) { return; } synchronized( ADDRESS_CACHE ) { CacheEntry entry = (CacheEntry)ADDRESS_CACHE.get( hostName ); if( entry == null ) { entry = new CacheEntry( hostName, addr, expiration ); ADDRESS_CACHE.put( hostName, entry ); } else { entry.address = addr; entry.expiration = expiration; } } } static void cacheAddressArray( NbtAddress[] addrs ) {
static void cacheAddress( Name hostName, NbtAddress addr, long expiration ) { if( CACHE_POLICY == 0 ) { return; } synchronized( ADDRESS_CACHE ) { CacheEntry entry = (CacheEntry)ADDRESS_CACHE.get( hostName ); if( entry == null ) { entry = new CacheEntry( hostName, addr, expiration ); ADDRESS_CACHE.put( hostName, entry ); } else { entry.address = addr; entry.expiration = expiration; } } } static void cacheAddressArray( NbtAddress[] addrs ) {
static void cacheAddress( Name hostName, NbtAddress addr, long expiration ) { if( CACHE_POLICY == 0 ) { return; } synchronized( ADDRESS_CACHE ) { CacheEntry entry = (CacheEntry)ADDRESS_CACHE.get( hostName ); if( entry == null ) { entry = new CacheEntry( hostName, addr, expiration ); ADDRESS_CACHE.put( hostName, entry ); } else { entry.address = addr; entry.expiration = expiration; } } } static void cacheAddressArray( NbtAddress[] addrs ) {
static void cacheAddress( Name hostName, NbtAddress addr, long expiration ) { if( CACHE_POLICY == 0 ) { return; } synchronized( ADDRESS_CACHE ) { CacheEntry entry = (CacheEntry)ADDRESS_CACHE.get( hostName ); if( entry == null ) { entry = new CacheEntry( hostName, addr, expiration ); ADDRESS_CACHE.put( hostName, entry ); } else { entry.address = addr; entry.expiration = expiration; } } } static void cacheAddressArray( NbtAddress[] addrs ) {