-
Notifications
You must be signed in to change notification settings - Fork 23
chore: Mode resolution and switching for FDv2 #326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aaron-zeisler
wants to merge
16
commits into
main
Choose a base branch
from
aaronz/SDK-1956/mode-resolution-and-switching
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,475
−37
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
d92af88
feat: Add FDv2 connection mode types and mode resolution table
aaron-zeisler 8b8bd7e
feat: Implement switchMode() on FDv2DataSource
aaron-zeisler 8b1af40
feat: Add FDv2DataSourceBuilder with stub configurer resolution
aaron-zeisler 2d1b776
feat: wire real FDv2 ComponentConfigurer implementations in FDv2DataS…
aaron-zeisler 05f9536
feat: Add FDv2 mode resolution to ConnectivityManager
aaron-zeisler c67b550
[SDK-1956] clean up unused code
aaron-zeisler 8976bfb
[SDK-1956] refactor: switch to Approach 2 for FDv2 mode resolution an…
aaron-zeisler b160c58
[SDK-1956] refactor: ModeAware no longer extends DataSource
aaron-zeisler fbcf5f6
[SDK-1956] refactor: separate event processor and data source logic i…
aaron-zeisler 4def25e
[SDK-1956] refactor: move synchronizer switching into SourceManager t…
aaron-zeisler e623fd6
[SDK-1956] refactor: move needsRefresh and FDv1/FDv2 branching into u…
aaron-zeisler 422bea2
[SDK-1956] Replace internal switchMode() with teardown/rebuild at Con…
aaron-zeisler 5473232
[SDK-1956] Address PR review feedback
aaron-zeisler 5c6ac49
[SDK-1956] Address Bugbot findings in FDv2 code
aaron-zeisler 9f5cb78
Merge branch 'main' into aaronz/SDK-1956/mode-resolution-and-switching
tanderson-ld 493179a
[SDK-1956] Address PR review comments and add FDv1 safety tests
aaron-zeisler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
39 changes: 39 additions & 0 deletions
39
...hdarkly-android-client-sdk/src/main/java/com/launchdarkly/sdk/android/ConnectionMode.java
This file contains hidden or 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,39 @@ | ||
| package com.launchdarkly.sdk.android; | ||
|
|
||
| /** | ||
| * Enumerates the built-in FDv2 connection modes. Each mode maps to a | ||
| * {@link ModeDefinition} that specifies which initializers and synchronizers | ||
| * are active when the SDK is operating in that mode. | ||
| * <p> | ||
| * Not to be confused with {@link ConnectionInformation.ConnectionMode}, which | ||
| * is the public FDv1 enum representing the SDK's current connection state | ||
| * (e.g. POLLING, STREAMING, SET_OFFLINE). This class is an internal FDv2 | ||
| * concept describing the <em>desired</em> data-acquisition pipeline. | ||
| * <p> | ||
| * This is a closed enum — custom connection modes (spec 5.3.5 TBD) are not | ||
| * supported in this release. | ||
| * <p> | ||
| * Package-private — not part of the public SDK API. | ||
aaron-zeisler marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| * | ||
| * @see ModeDefinition | ||
| * @see ModeResolutionTable | ||
| */ | ||
| final class ConnectionMode { | ||
|
|
||
| static final ConnectionMode STREAMING = new ConnectionMode("streaming"); | ||
| static final ConnectionMode POLLING = new ConnectionMode("polling"); | ||
| static final ConnectionMode OFFLINE = new ConnectionMode("offline"); | ||
| static final ConnectionMode ONE_SHOT = new ConnectionMode("one-shot"); | ||
| static final ConnectionMode BACKGROUND = new ConnectionMode("background"); | ||
|
|
||
| private final String name; | ||
|
|
||
| private ConnectionMode(String name) { | ||
| this.name = name; | ||
| } | ||
|
|
||
| @Override | ||
| public String toString() { | ||
| return name; | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.