Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Conversation

@drichelson
Copy link
Contributor

Implementing these changes: launchdarkly/go-client#37


if (config.offline || config.useLdd) {
logger.info("Starting LaunchDarkly client in offline mode");
setOffline();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the changes in the go-client is that this bit of state is now immutable. If that's the case then we should eliminate setOffline / setOnline and we no longer need a thread-safe volatile boolean for offline-- it should just be a final.

*/
public LDClient(String apiKey) {
this(apiKey, LDConfig.DEFAULT);
public LDClient(String apiKey, Long waitForMillis) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not an unboxed long?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Muscle memory from Scala... I'll change it

@drichelson
Copy link
Contributor Author

This passes both streaming and non-streaming integration harnesses. I'd like to close this out before moving on to other client changes- Thumbs pls @jkodumal ?
We can always revisit these changes in the context of future ones.

@Override
public boolean initialized() {
return initialized && config.featureStore.initialized();
return initialized.get() && config.featureStore.initialized();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need to remove the check on the featurestore here.

private static final int DEFAULT_SOCKET_TIMEOUT = 10000;
private static final int DEFAULT_FLUSH_INTERVAL = 5;
private static final long DEFAULT_POLLING_INTERVAL_MILLIS = 1000L;
private static final long DEFAULT_START_WAIT_MILLIS = 0L;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the most sensible behavior is to set this to something like 5 seconds, as that's how we'd want most customers to use it.

@jkodumal
Copy link
Contributor

jkodumal commented Apr 9, 2016

I suggest changing the default wait time, but otherwise
👍

Add event sampling. Name threads.
@drichelson drichelson merged commit e1855d1 into jko/okhttp-eventsource Apr 9, 2016
@drichelson drichelson deleted the dr/bounded branch April 9, 2016 20:40
drichelson pushed a commit that referenced this pull request Apr 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants