org.hd.d.pg2k.svrCore.location
Class LoadBalancingUtils.MirrorInfo

java.lang.Object
  extended by org.hd.d.pg2k.svrCore.location.LoadBalancingUtils.MirrorInfo
Enclosing class:
LoadBalancingUtils

private static final class LoadBalancingUtils.MirrorInfo
extends java.lang.Object

Immutable info on interaction with one remote mirror.


Field Summary
(package private)  java.lang.Thread checker
          Non-null if being checked in background by thread; null if not being checked.
(package private)  java.lang.Boolean isUp
          TRUE if the mirror seems to be up and working and accessible.
(package private)  long validUntil
          Time that this info is valid until.
 
Constructor Summary
LoadBalancingUtils.MirrorInfo(java.lang.Boolean isUp, java.lang.Thread t)
          Make a new instance with a suitable lifetime...
 
Method Summary
(package private)  boolean canExpire()
          If true then this entry can be expired.
(package private)  boolean expiresSoon()
          If true then this entry will expire soon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

validUntil

final long validUntil
Time that this info is valid until.


isUp

final java.lang.Boolean isUp
TRUE if the mirror seems to be up and working and accessible. FALSE if the mirror seems to be down. null if we do not yet know, because we are checking asynchronously.


checker

final java.lang.Thread checker
Non-null if being checked in background by thread; null if not being checked. If any referred-to thread is not alive then this entry is not being checked.

Constructor Detail

LoadBalancingUtils.MirrorInfo

LoadBalancingUtils.MirrorInfo(java.lang.Boolean isUp,
                              java.lang.Thread t)
Make a new instance with a suitable lifetime...

Method Detail

canExpire

boolean canExpire()
If true then this entry can be expired. This is true if the validUntil time has passed and there is no thread working on this host/entry.


expiresSoon

boolean expiresSoon()
If true then this entry will expire soon. This can be used to decide if we should start a new checker thread.

This is true if the validUntil time will pass soon and there is no thread working on this host/entry.


DHD Multimedia Gallery V1.57.21

Copyright (c) 1996-2011, Damon Hart-Davis. All rights reserved.