Class ClockFactoryImpl
- java.lang.Object
-
- net.officefloor.frame.impl.execute.clock.ClockFactoryImpl
-
- All Implemented Interfaces:
ClockFactory
,BackgroundScheduling
public class ClockFactoryImpl extends java.lang.Object implements ClockFactory, BackgroundScheduling
ClockFactory
implementation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ClockFactoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Clock<T>
createClock(java.util.function.Function<java.lang.Long,T> translator)
Creates aClock
.protected long
currentTimeSeconds()
Obtains the current time in seconds since Epoch.void
startBackgroundScheduling(BackgroundScheduler scheduler)
Starts theBackgroundScheduling
.
-
-
-
Method Detail
-
currentTimeSeconds
protected long currentTimeSeconds()
Obtains the current time in seconds since Epoch.- Returns:
- Current time in seconds since Epoch.
-
createClock
public <T> Clock<T> createClock(java.util.function.Function<java.lang.Long,T> translator)
Description copied from interface:ClockFactory
Creates aClock
.- Specified by:
createClock
in interfaceClockFactory
- Parameters:
translator
- Translate the seconds since Epoch toClock
time.- Returns:
Clock
.
-
startBackgroundScheduling
public void startBackgroundScheduling(BackgroundScheduler scheduler)
Description copied from interface:BackgroundScheduling
Starts theBackgroundScheduling
.- Specified by:
startBackgroundScheduling
in interfaceBackgroundScheduling
- Parameters:
scheduler
-BackgroundScheduler
.
-
-