forked from KNEMC/KLALB
KLALB V3.4
This commit is contained in:
@@ -67,7 +67,7 @@ public class RouterInfo implements Serializable{
|
||||
return createTime;
|
||||
}
|
||||
private static final long INFO_UPDATETIME=10000000000L;
|
||||
private static final long INFO_TIMEOUT=120000000000L;
|
||||
private static final long INFO_TIMEOUT=60000000000L;
|
||||
private long putTime=System.nanoTime();
|
||||
public boolean checkUpdateTime() {
|
||||
return System.nanoTime()-putTime>INFO_UPDATETIME;
|
||||
@@ -77,6 +77,10 @@ public class RouterInfo implements Serializable{
|
||||
return System.nanoTime()-putTime>INFO_TIMEOUT;
|
||||
}
|
||||
|
||||
public boolean checkTimeOut(long timeout) {
|
||||
return System.nanoTime()-putTime>timeout;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RINFO [locator=" + locator + ", neighborAddresses=" + neighborAddresses + ", putTime=" + putTime
|
||||
@@ -123,4 +127,5 @@ public class RouterInfo implements Serializable{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user