public class TimeSourceProvider
extends java.lang.Object
NTPTimeSource
, but can be switched to other implementations
via the TIMESOURCE_CLASSNAME_PROPERTY
system property.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_TIMESOURCE_CLASS_NAME
Default class to use when getting a TimeSource instance
|
static java.lang.String |
TIMESOURCE_CLASSNAME_PROPERTY
Name of the system property to set if the TimeSource type/class is to be customized
|
Modifier and Type | Method and Description |
---|---|
static TimeSource |
getInstance()
Get a TimeSource
the default TimeSource instance (default:
NTPTimeSource |
static TimeSource |
getInstance(java.lang.String className)
Get a specific TimeSource by class name
|
public static final java.lang.String DEFAULT_TIMESOURCE_CLASS_NAME
public static final java.lang.String TIMESOURCE_CLASSNAME_PROPERTY
public static TimeSource getInstance()
NTPTimeSource
public static TimeSource getInstance(java.lang.String className)
className
- Class name of the TimeSource to return the instance for