Holger's Java API

## com.antelmann.calendar
Class AtomicTime

    java.lang.Object
      com.antelmann.calendar.AtomicTime

All Implemented Interfaces:
  TimeSystem

Deprecated. use `NTPTime` instead

    @Deprecated
    public class AtomicTime

extends Object
implements TimeSystem

works based on an AtomicClock instance adding reliability by using multiple servers if one fails.

Author:
  Holger Antelmann
See Also:
  `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

### AtomicTime

    public AtomicTime()

  Deprecated.
  immediately activates the instance and schedules updates in the interval given. Interval is 24h.

### AtomicTime

    public AtomicTime(boolean activateNow)

  Deprecated.
  Interval is 24h.

### AtomicTime

    public AtomicTime(boolean activateNow,
                      long updateIntervalMillis)
               throws IllegalArgumentException

  Deprecated.
  immediately activates the instance and schedules updates in the interval given.

  Parameters:
    `updateIntervalMillis` - must represent more than a minute
  Throws:
    `IllegalArgumentException` - if the interval represents less than a minute

### AtomicTime

    public AtomicTime(boolean activateNow,
                      long updateIntervalMillis,
                      Logger logger)
               throws IllegalArgumentException

  Deprecated.
  Parameters:
    `activateNow` - if true, the instance is immediately activated
    `updateIntervalMillis` - must represent more than a minute
    `logger` - used to log the scheduled delta updates for the atomic clock
  Throws:
    `IllegalArgumentException` - if the interval represents less than 5 minutes

Method Detail

### isActivated

    public boolean isActivated()

  Deprecated.

### getUpdateIntervalMillis

    public long getUpdateIntervalMillis()

  Deprecated.

### setUpdateIntervalMillis

    public void setUpdateIntervalMillis(long updateIntervalMillis)
                                 throws IllegalStateException,
                                        IllegalArgumentException

  Deprecated.
  must be called while the instance is deactivated.

  Throws:
    `IllegalStateException` - if this instance is currently activated
    `IllegalArgumentException` - if the interval represents less than 5 minutes
  See Also:
    `isActivated()`

### activate

    public void activate()

  Deprecated.
  activates the embedded timer for automatic updates

### deactivate

    public void deactivate()

  Deprecated.
  deactivates the embedded timer for automatic updates

### finalize

    protected void finalize()

  Deprecated.
  Overrides:
    `finalize` in class `Object`

### currentTimeMillis

    public long currentTimeMillis()

  Deprecated.
  returns the current time

  Specified by:
    `currentTimeMillis` in interface `TimeSystem`
  Returns:
    the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.

### getAtomicClock

    public TimeProtocolClient getAtomicClock()

  Deprecated.
  returns the clock in use

### getLogger

    public Logger getLogger()

  Deprecated.

### getServerNames

    public String[] getServerNames()

  Deprecated.

### addServer

    public boolean addServer(String server)

  Deprecated.

### removeServer

    public boolean removeServer(String server)

  Deprecated.

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads