-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#39 Deprecate TimeProvider to use Clock instead
- Loading branch information
Showing
6 changed files
with
47 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
plume-scheduler/src/main/java/com/coreoz/plume/scheduler/SchedulerProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
plume-services/src/main/java/com/coreoz/plume/guice/GuiceServicesModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
plume-services/src/main/java/com/coreoz/plume/services/time/ClockProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.coreoz.plume.services.time; | ||
|
||
import jakarta.inject.Inject; | ||
import jakarta.inject.Provider; | ||
import jakarta.inject.Singleton; | ||
|
||
import java.time.Clock; | ||
|
||
@Singleton | ||
public class ClockProvider implements Provider<Clock> { | ||
private final Clock clock; | ||
|
||
@Inject | ||
public ClockProvider() { | ||
this.clock = Clock.systemDefaultZone(); | ||
} | ||
|
||
@Override | ||
public Clock get() { | ||
return clock; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters