public class TimeClient
extends java.lang.Thread
| Modifier and Type | Field and Description |
|---|---|
long |
networkLatencySum |
long |
packetCount |
java.math.BigInteger |
skewSum
big integer is required because the sum can be greater than Long.MAX_VALUE
and we need full precision
|
| Constructor and Description |
|---|
TimeClient(java.lang.String host,
int port,
int frequencyMs,
int latencyThresholdMs,
int samplesToAverage) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeStatistics() |
long |
getClockSkew() |
int |
getFrequencyMs() |
long |
getNetworkLatency() |
void |
openStatistics() |
void |
run() |
java.lang.String |
toString() |
void |
waitForInitialization()
Wait until the clock skew is set to a real value.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yieldpublic java.math.BigInteger skewSum
public long networkLatencySum
public long packetCount
public TimeClient(java.lang.String host,
int port,
int frequencyMs,
int latencyThresholdMs,
int samplesToAverage)
throws java.io.IOException
java.io.IOExceptionpublic int getFrequencyMs()
public long getClockSkew()
public long getNetworkLatency()
public void openStatistics()
public void closeStatistics()
public java.lang.String toString()
toString in class java.lang.Threadpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void waitForInitialization()
throws java.lang.InterruptedException
java.lang.InterruptedException - if interrupted while waitingCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.