public interface SntpConfiguration extends NetTimeConfiguration
Represents a configuration for a connection to a NTP-Server.
Implementations of this SPI-interface must be
immutable or at least threadsafe. Instances can be
created manually or via a ServiceLoader.
ServiceLoaderDEFAULT_CONNECTION_TIMEOUT| Modifier and Type | Method and Description |
|---|---|
short |
getRequestCount()
Determines how often a SNTP-Client will send queries during a
connection for the purpose of the calculation of an arithmetic
mean value.
|
int |
getRequestInterval()
Determines the rate by which a SNTP-client sends queries during
a connection for the purpose of the calculation of an arithmetic
mean value.
|
boolean |
isNTP4()
Determines if NTP3 or NTP4 should be used.
|
getClockShiftWindow, getConnectionTimeout, getTimeServerAddress, getTimeServerPortboolean isNTP4()
Determines if NTP3 or NTP4 should be used.
true if NTP4 shall be used else falseint getRequestInterval()
Determines the rate by which a SNTP-client sends queries during a connection for the purpose of the calculation of an arithmetic mean value.
Default value is 60 * 4 (that is 4 minutes). This method
is only relevant if getRequestCount() yields at least the
value 2. One single connection request can contain several
queries this way. Note that some servers will block requests if
they happen too often.
short getRequestCount()
Determines how often a SNTP-Client will send queries during a connection for the purpose of the calculation of an arithmetic mean value.
Default value is 1 (single query). The value 0
is also permitted and effectively stops any query. If any bigger
value (> 1) is configured then an asynchronous connection
to the NTP-server is recommended. One single connection request can
contain several queries this way. Note that some servers will block
requests if they happen too often.
0 <= x < 1000NetTimeConnector.connect()Copyright © 2014–2016. All rights reserved.