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 StringDB_REQUEST_DELAY_PROPERTYstatic StringDB_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 OptionalLonggetDiffMillis()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.StringgetName()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:CentralTimeProviderReturns the short name of the time provider instance.- Specified by:
getNamein interfaceCentralTimeProvider
-
getDiffMillis
@NotNull public OptionalLong getDiffMillis()
Description copied from interface:CentralTimeProviderReturns 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:
getDiffMillisin interfaceCentralTimeProvider
-
-