|
54 | 54 | import io.split.engine.experiments.SplitFetcherImp; |
55 | 55 | import io.split.engine.experiments.SplitParser; |
56 | 56 | import io.split.engine.experiments.SplitSynchronizationTask; |
| 57 | +import io.split.engine.experiments.RuleBasedSegmentParser; |
57 | 58 | import io.split.engine.segments.SegmentChangeFetcher; |
58 | 59 | import io.split.engine.segments.SegmentSynchronizationTaskImp; |
59 | 60 | import io.split.integrations.IntegrationsConfig; |
|
68 | 69 | import io.split.storages.SplitCacheProducer; |
69 | 70 | import io.split.storages.RuleBasedSegmentCacheConsumer; |
70 | 71 | import io.split.storages.RuleBasedSegmentCache; |
| 72 | +import io.split.storages.RuleBasedSegmentCacheProducer; |
71 | 73 | import io.split.storages.enums.OperationMode; |
72 | 74 | import io.split.storages.memory.InMemoryCacheImp; |
73 | 75 | import io.split.storages.memory.SegmentCacheInMemoryImpl; |
@@ -219,8 +221,10 @@ public SplitFactoryImpl(String apiToken, SplitClientConfig config) throws URISyn |
219 | 221 | _segmentSynchronizationTaskImp = buildSegments(config, segmentCache, splitCache); |
220 | 222 |
|
221 | 223 | SplitParser splitParser = new SplitParser(); |
| 224 | + RuleBasedSegmentParser ruleBasedSegmentParser = new RuleBasedSegmentParser(); |
222 | 225 | // SplitFetcher |
223 | | - _splitFetcher = buildSplitFetcher(splitCache, splitParser, flagSetsFilter); |
| 226 | + _splitFetcher = buildSplitFetcher(splitCache, splitParser, flagSetsFilter, |
| 227 | + ruleBasedSegmentParser, ruleBasedSegmentCache); |
224 | 228 |
|
225 | 229 | // SplitSynchronizationTask |
226 | 230 | _splitSynchronizationTask = new SplitSynchronizationTask(_splitFetcher, |
@@ -421,9 +425,10 @@ protected SplitFactoryImpl(SplitClientConfig config) { |
421 | 425 | // SplitFetcher |
422 | 426 | SplitChangeFetcher splitChangeFetcher = createSplitChangeFetcher(config); |
423 | 427 | SplitParser splitParser = new SplitParser(); |
| 428 | + RuleBasedSegmentParser ruleBasedSegmentParser = new RuleBasedSegmentParser(); |
424 | 429 |
|
425 | 430 | _splitFetcher = new SplitFetcherImp(splitChangeFetcher, splitParser, splitCache, _telemetryStorageProducer, |
426 | | - flagSetsFilter); |
| 431 | + flagSetsFilter, ruleBasedSegmentParser, _ruleBasedSegmentCache); |
427 | 432 |
|
428 | 433 | // SplitSynchronizationTask |
429 | 434 | _splitSynchronizationTask = new SplitSynchronizationTask(_splitFetcher, splitCache, |
@@ -616,11 +621,12 @@ private SegmentSynchronizationTaskImp buildSegments(SplitClientConfig config, |
616 | 621 | } |
617 | 622 |
|
618 | 623 | private SplitFetcher buildSplitFetcher(SplitCacheProducer splitCacheProducer, SplitParser splitParser, |
619 | | - FlagSetsFilter flagSetsFilter) throws URISyntaxException { |
| 624 | + FlagSetsFilter flagSetsFilter, RuleBasedSegmentParser ruleBasedSegmentParser, |
| 625 | + RuleBasedSegmentCacheProducer ruleBasedSegmentCache) throws URISyntaxException { |
620 | 626 | SplitChangeFetcher splitChangeFetcher = HttpSplitChangeFetcher.create(_splitHttpClient, _rootTarget, |
621 | 627 | _telemetryStorageProducer); |
622 | 628 | return new SplitFetcherImp(splitChangeFetcher, splitParser, splitCacheProducer, _telemetryStorageProducer, |
623 | | - flagSetsFilter); |
| 629 | + flagSetsFilter, ruleBasedSegmentParser, ruleBasedSegmentCache); |
624 | 630 | } |
625 | 631 |
|
626 | 632 | private ImpressionsManagerImpl buildImpressionsManager(SplitClientConfig config, |
|
0 commit comments