Class DatabaseTimeProvider
- java.lang.Object
-
- jetbrains.buildServer.serverSide.time.DatabaseTimeProvider
-
- All Implemented Interfaces:
CentralTimeProvider
public class DatabaseTimeProvider extends Object implements CentralTimeProvider
-
-
Field Summary
Fields Modifier and Type Field Description static String
DB_REQUEST_DELAY_PROPERTY
static String
DB_REQUEST_INITIAL_DELAY_PROPERTY
-
Constructor Summary
Constructors Constructor Description DatabaseTimeProvider(ExecutorServices executorServices, EventDispatcher<BuildServerListener> dispatcher, SQLRunnerEx sqlRunner, TeamCityNodes teamCityNodes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OptionalLong
getDiffMillis()
Returns the number of milliseconds that it is need to add to the server local time to match central time.
Returns empty optional if is not synchronized with central time.String
getName()
Returns the short name of the time provider instance.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.time.CentralTimeProvider
nowMillis
-
-
-
-
Field Detail
-
DB_REQUEST_INITIAL_DELAY_PROPERTY
public static final String DB_REQUEST_INITIAL_DELAY_PROPERTY
- See Also:
- Constant Field Values
-
DB_REQUEST_DELAY_PROPERTY
public static final String DB_REQUEST_DELAY_PROPERTY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DatabaseTimeProvider
public DatabaseTimeProvider(@NotNull ExecutorServices executorServices, @NotNull EventDispatcher<BuildServerListener> dispatcher, @NotNull SQLRunnerEx sqlRunner, @NotNull TeamCityNodes teamCityNodes)
-
-
Method Detail
-
getName
@NotNull public String getName()
Description copied from interface:CentralTimeProvider
Returns the short name of the time provider instance.- Specified by:
getName
in interfaceCentralTimeProvider
-
getDiffMillis
@NotNull public OptionalLong getDiffMillis()
Description copied from interface:CentralTimeProvider
Returns the number of milliseconds that it is need to add to the server local time to match central time.
Returns empty optional if is not synchronized with central time.- Specified by:
getDiffMillis
in interfaceCentralTimeProvider
-
-