Skip to content

Commit b8c5389

Browse files
committed
PR feedback.
1 parent cb79f5e commit b8c5389

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

lib/sdk/server/src/main/java/com/launchdarkly/sdk/server/FDv2DataSource.java

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,7 @@ public enum State {
4444
/**
4545
* This synchronizer is no longer available to use.
4646
*/
47-
Blocked,
48-
49-
/**
50-
* This synchronizer is recovering from a previous failure and will be available to use
51-
* after a delay.
52-
*/
53-
Recovering
47+
Blocked
5448
}
5549

5650
private final SynchronizerFactory factory;
@@ -70,11 +64,6 @@ public void block() {
7064
state = State.Blocked;
7165
}
7266

73-
public void setRecovering(Duration delay) {
74-
state = State.Recovering;
75-
// TODO: Determine how/when to recover.
76-
}
77-
7867
public Synchronizer build() {
7968
return factory.build();
8069
}
@@ -234,13 +223,6 @@ public boolean isInitialized() {
234223

235224
@Override
236225
public void close() throws IOException {
237-
// If this is already set, then this has no impact.
238-
startFuture.complete(false);
239-
synchronized (synchronizers) {
240-
for (SynchronizerFactoryWithState synchronizer : synchronizers) {
241-
synchronizer.block();
242-
}
243-
}
244226
// If there is an active source, we will shut it down, and that will result in the loop handling that source
245227
// exiting.
246228
// If we do not have an active source, then the loop will check isShutdown when attempting to set one. When
@@ -251,5 +233,8 @@ public void close() throws IOException {
251233
activeSource.shutdown();
252234
}
253235
}
236+
237+
// If this is already set, then this has no impact.
238+
startFuture.complete(false);
254239
}
255240
}

0 commit comments

Comments
 (0)