|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.calendar.AtomicTime
NTPTime instead
@Deprecated public class AtomicTime
works based on an AtomicClock instance adding reliability by using multiple servers if one fails.
TimeProtocolClient| Field Summary |
|---|
| Fields inherited from interface com.antelmann.calendar.TimeSystem |
|---|
SYSTEM_TIME |
| Constructor Summary | |
|---|---|
AtomicTime()
Deprecated. immediately activates the instance and schedules updates in the interval given. |
|
AtomicTime(boolean activateNow)
Deprecated. Interval is 24h. |
|
AtomicTime(boolean activateNow,
long updateIntervalMillis)
Deprecated. immediately activates the instance and schedules updates in the interval given. |
|
AtomicTime(boolean activateNow,
long updateIntervalMillis,
Logger logger)
Deprecated. |
|
| Method Summary | |
|---|---|
void |
activate()
Deprecated. activates the embedded timer for automatic updates |
boolean |
addServer(String server)
Deprecated. |
long |
currentTimeMillis()
Deprecated. returns the current time |
void |
deactivate()
Deprecated. deactivates the embedded timer for automatic updates |
protected void |
finalize()
Deprecated. |
TimeProtocolClient |
getAtomicClock()
Deprecated. returns the clock in use |
Logger |
getLogger()
Deprecated. |
String[] |
getServerNames()
Deprecated. |
long |
getUpdateIntervalMillis()
Deprecated. |
boolean |
isActivated()
Deprecated. |
boolean |
removeServer(String server)
Deprecated. |
void |
setUpdateIntervalMillis(long updateIntervalMillis)
Deprecated. must be called while the instance is deactivated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AtomicTime()
public AtomicTime(boolean activateNow)
public AtomicTime(boolean activateNow,
long updateIntervalMillis)
throws IllegalArgumentException
updateIntervalMillis - must represent more than a minute
IllegalArgumentException - if the interval represents less than a minute
public AtomicTime(boolean activateNow,
long updateIntervalMillis,
Logger logger)
throws IllegalArgumentException
activateNow - if true, the instance is immediately activatedupdateIntervalMillis - must represent more than a minutelogger - used to log the scheduled delta updates for the atomic clock
IllegalArgumentException - if the interval represents less than 5 minutes| Method Detail |
|---|
public boolean isActivated()
public long getUpdateIntervalMillis()
public void setUpdateIntervalMillis(long updateIntervalMillis)
throws IllegalStateException,
IllegalArgumentException
IllegalStateException - if this instance is currently activated
IllegalArgumentException - if the interval represents less than 5 minutesisActivated()public void activate()
public void deactivate()
protected void finalize()
finalize in class Objectpublic long currentTimeMillis()
currentTimeMillis in interface TimeSystempublic TimeProtocolClient getAtomicClock()
public Logger getLogger()
public String[] getServerNames()
public boolean addServer(String server)
public boolean removeServer(String server)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||