generated from telekom/reuse-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: (DHEI-15120) - Introduce clean schemastore usage
- Loading branch information
1 parent
dd750e6
commit de50788
Showing
16 changed files
with
81 additions
and
451 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
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
everitJsonVersion=1.14.4 | ||
horizonParentVersion=3.2.1 | ||
horizonParentVersion=0.0.0-main-SNAPSHOT |
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
115 changes: 0 additions & 115 deletions
115
src/main/java/de/telekom/horizon/starlight/cache/SchemaCache.java
This file was deleted.
Oops, something went wrong.
63 changes: 0 additions & 63 deletions
63
src/main/java/de/telekom/horizon/starlight/cache/SchemaCacheKey.java
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
src/main/java/de/telekom/horizon/starlight/cache/SchemaCacheUpdateService.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,34 @@ | ||
// Copyright 2024 Deutsche Telekom IT GmbH | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package de.telekom.horizon.starlight.cache; | ||
|
||
import de.telekom.eni.pandora.horizon.schema.SchemaStore; | ||
import de.telekom.horizon.starlight.config.StarlightConfig; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.scheduling.annotation.Scheduled; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
@Slf4j | ||
public class SchemaCacheUpdateService { | ||
|
||
private final StarlightConfig starlightConfig; | ||
|
||
private final SchemaStore schemaStore; | ||
|
||
@Autowired | ||
public SchemaCacheUpdateService(SchemaStore schemaStore, StarlightConfig starlightConfig) { | ||
this.schemaStore = schemaStore; | ||
this.starlightConfig = starlightConfig; | ||
} | ||
|
||
@Scheduled(fixedRateString = "${eniapi.refreshInterval}") | ||
protected void scheduledPollSchemas() { | ||
if(starlightConfig.isEnableSchemaValidation()) { | ||
schemaStore.pollSchemas(); | ||
} | ||
} | ||
} |
Oops, something went wrong.