Methods Summary |
---|
public com.aelitis.azureus.core.dht.router.DHTRouterContactAttachment | getAttachment()
return( attachment );
|
protected long | getFirstAliveTime()
return( first_alive_time );
|
protected long | getFirstFailOrLastAliveTime()
return( first_fail_or_last_alive_time );
|
protected long | getFirstFailTime()
return( fail_count==0?0:first_fail_or_last_alive_time );
|
public byte[] | getID()
return(node_id );
|
protected long | getLastAddedTime()
return( last_added_time );
|
protected long | getLastAliveTime()
return( fail_count==0?first_fail_or_last_alive_time:0 );
|
protected boolean | getPingOutstanding()
return( ping_outstanding );
|
public java.lang.String | getString()
return( DHTLog.getString2(node_id) + "[hba=" + (has_been_alive?"Y":"N" ) +
",bad=" + fail_count +
",OK=" + getTimeAlive() + "]");
|
public long | getTimeAlive()
if ( fail_count > 0 || first_alive_time == 0 ){
return( 0 );
}
return( SystemTime.getCurrentTime() - first_alive_time );
|
public boolean | hasBeenAlive()
return( has_been_alive );
|
protected boolean | hasFailed()
if ( has_been_alive ){
return( fail_count >= attachment.getMaxFailForLiveCount());
}else{
return( fail_count >= attachment.getMaxFailForUnknownCount());
}
|
public boolean | isAlive()
return( has_been_alive && fail_count == 0 );
|
public boolean | isBucketEntry()
return is_bucket_entry;
|
public boolean | isFailing()
return( fail_count > 0 );
|
public boolean | isReplacement()
return !is_bucket_entry;
|
public void | setAlive()
fail_count = 0;
first_fail_or_last_alive_time = SystemTime.getCurrentTime();
has_been_alive = true;
if ( first_alive_time == 0 ){
first_alive_time = first_fail_or_last_alive_time;
}
|
protected void | setAttachment(com.aelitis.azureus.core.dht.router.DHTRouterContactAttachment _attachment)
attachment = _attachment;
|
public void | setBucketEntry()
is_bucket_entry = true;
|
protected boolean | setFailed()
fail_count++;
if ( fail_count == 1 ){
first_fail_or_last_alive_time = SystemTime.getCurrentTime();
}
return( hasFailed());
|
protected void | setLastAddedTime(long l)
last_added_time = l;
|
protected void | setPingOutstanding(boolean b)
ping_outstanding = b;
|
public void | setReplacement()
is_bucket_entry = false;
|