edu.harvard.syrah.pyxida.nc.lib
Class RemoteState<T>
java.lang.Object
edu.harvard.syrah.pyxida.nc.lib.RemoteState<T>
- Type Parameters:
T
- the type of the unique identifier of a host
public class RemoteState<T>
- extends java.lang.Object
The state kept of a remote node between samples.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SAMPLE_PERCENTILE
protected static double SAMPLE_PERCENTILE
MAX_SAMPLE_SIZE
public static int MAX_SAMPLE_SIZE
MIN_SAMPLE_SIZE
public static int MIN_SAMPLE_SIZE
addr
protected final T addr
ping_samples
protected final WindowStatistic ping_samples
last_coords
protected Coordinate last_coords
last_error
protected double last_error
last_update_time
protected long last_update_time
last_ping_time
protected long last_ping_time
RemoteState
public RemoteState(T _addr)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getAddress
public T getAddress()
assign
public void assign(Coordinate _last_coords,
double _last_error,
long _curr_time)
addSample
public void addSample(double sample_rtt,
long sample_age,
Coordinate r_coord,
double r_error,
long curr_time)
isValid
public boolean isValid(long curr_time)
getSample
public double getSample()
getSampleSize
public int getSampleSize()
getLastCoordinate
public Coordinate getLastCoordinate()
getLastError
public double getLastError()
getLastUpdateTime
public long getLastUpdateTime()
getLastPingTime
public long getLastPingTime()
setLastPingTime
public void setLastPingTime(long time)
main
public static void main(java.lang.String[] args)