-
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.
- Loading branch information
Showing
25 changed files
with
320 additions
and
431 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package no.entur.antu.config; | ||
|
||
import static no.entur.antu.config.cache.CacheConfig.*; | ||
|
||
import java.util.Map; | ||
import no.entur.antu.netexdata.RedisCommonDataRepository; | ||
import org.entur.netex.validation.validator.jaxb.CommonDataRepositoryLoader; | ||
import org.redisson.api.RedissonClient; | ||
import org.springframework.beans.factory.annotation.Qualifier; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.annotation.Profile; | ||
|
||
@Configuration | ||
public class CommonDataConfig { | ||
|
||
@Bean | ||
@Profile("!test") | ||
CommonDataRepositoryLoader commonDataRepository( | ||
RedissonClient redissonClient, | ||
@Qualifier( | ||
SCHEDULED_STOP_POINT_AND_QUAY_ID_CACHE | ||
) Map<String, Map<String, String>> scheduledStopPointAndQuayIdCache, | ||
@Qualifier( | ||
SERVICE_LINKS_AND_SCHEDULED_STOP_POINT_IDS_CACHE | ||
) Map<String, Map<String, String>> serviceLinksAndFromToScheduledStopPointIdCache | ||
) { | ||
return new RedisCommonDataRepository( | ||
redissonClient, | ||
scheduledStopPointAndQuayIdCache, | ||
serviceLinksAndFromToScheduledStopPointIdCache | ||
); | ||
} | ||
} |
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
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
13 changes: 13 additions & 0 deletions
13
src/main/java/no/entur/antu/netexdata/NetexDataRepositoryLoader.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,13 @@ | ||
package no.entur.antu.netexdata; | ||
|
||
import org.entur.netex.validation.validator.jaxb.NetexDataRepository; | ||
|
||
/** | ||
* This interface extends the read-only interface {@link NetexDataRepository} with methods for cleaning up the repository. | ||
*/ | ||
public interface NetexDataRepositoryLoader extends NetexDataRepository { | ||
/** | ||
* Clean up the NeTEx data repository for the given validation report. | ||
*/ | ||
void cleanUp(String validationReportId); | ||
} |
Oops, something went wrong.