Skip to content

Commit

Permalink
Merge pull request #469 from splitio/SDKS-7890
Browse files Browse the repository at this point in the history
[SDKS-7890] Update naming convention and remove some imports not using
  • Loading branch information
nmayorsplit authored May 14, 2024
2 parents 3a41831 + e421434 commit 7506116
Show file tree
Hide file tree
Showing 55 changed files with 474 additions and 569 deletions.
8 changes: 8 additions & 0 deletions client/src/main/java/io/split/client/SplitClientConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,17 @@ public String telemetryURL() {
return _telemetryURL;
}

/**
* @deprecated As of release 4.X.X, replaced by {@link #getTelemetryRefreshRate()} } //todo update version
**/
@Deprecated
public int get_telemetryRefreshRate() {
return _telemetryRefreshRate;
}

public int getTelemetryRefreshRate() {
return _telemetryRefreshRate;
}
public int streamingRetryDelay() {return _onDemandFetchRetryDelayMs;}

public int streamingFetchMaxRetries() {return _onDemandFetchMaxRetries;}
Expand Down
10 changes: 3 additions & 7 deletions client/src/main/java/io/split/client/SplitFactoryImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,7 @@ public SplitFactoryImpl(String apiToken, SplitClientConfig config) throws URISyn
EventsSender eventsSender = EventsSender.create(_splitHttpClient, _eventsRootTarget, _telemetryStorageProducer);
_eventsTask = EventsTask.create(config.eventSendIntervalInMillis(), eventsStorage, eventsSender,
config.getThreadFactory());

_telemetrySyncTask = new TelemetrySyncTask(config.get_telemetryRefreshRate(), _telemetrySynchronizer,
config.getThreadFactory());
_telemetrySyncTask = new TelemetrySyncTask(config.getTelemetryRefreshRate(), _telemetrySynchronizer, config.getThreadFactory());

// Evaluator
_evaluator = new EvaluatorImp(splitCache, segmentCache);
Expand Down Expand Up @@ -330,10 +328,8 @@ protected SplitFactoryImpl(String apiToken, SplitClientConfig config, CustomStor
_evaluator = new EvaluatorImp(userCustomSplitAdapterConsumer, userCustomSegmentAdapterConsumer);
_impressionsSender = PluggableImpressionSender.create(customStorageWrapper);
_uniqueKeysTracker = createUniqueKeysTracker(config);
_impressionsManager = buildImpressionsManager(config, userCustomImpressionAdapterConsumer,
userCustomImpressionAdapterProducer);
_telemetrySyncTask = new TelemetrySyncTask(config.get_telemetryRefreshRate(), _telemetrySynchronizer,
config.getThreadFactory());
_impressionsManager = buildImpressionsManager(config, userCustomImpressionAdapterConsumer, userCustomImpressionAdapterProducer);
_telemetrySyncTask = new TelemetrySyncTask(config.getTelemetryRefreshRate(), _telemetrySynchronizer, config.getThreadFactory());

SplitTasks splitTasks = SplitTasks.build(null, null,
_impressionsManager, null, _telemetrySyncTask, _uniqueKeysTracker);
Expand Down
3 changes: 0 additions & 3 deletions client/src/main/java/io/split/engine/SDKReadinessGates.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

Expand Down
3 changes: 0 additions & 3 deletions client/src/main/java/io/split/engine/common/SplitTasks.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@
import io.split.client.impressions.UniqueKeysTracker;
import io.split.engine.experiments.SplitSynchronizationTask;
import io.split.engine.segments.SegmentSynchronizationTask;
import io.split.engine.segments.SegmentSynchronizationTaskImp;
import io.split.telemetry.synchronizer.TelemetrySyncTask;

import static com.google.common.base.Preconditions.checkNotNull;

public class SplitTasks {
private final SplitSynchronizationTask _splitSynchronizationTask;
private final SegmentSynchronizationTask _segmentSynchronizationTask;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.split.engine.matchers;

import io.split.engine.evaluator.EvaluationContext;
import io.split.engine.evaluator.Evaluator;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.split.engine.matchers;

import io.split.engine.evaluator.EvaluationContext;
import io.split.engine.evaluator.Evaluator;

import java.util.Map;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import io.split.client.dtos.DataType;
import io.split.engine.evaluator.EvaluationContext;
import io.split.engine.evaluator.Evaluator;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.split.engine.matchers;

import io.split.engine.evaluator.EvaluationContext;
import io.split.engine.evaluator.Evaluator;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import io.split.client.SplitClientImpl;
import io.split.client.dtos.MatcherCombiner;
import io.split.engine.evaluator.EvaluationContext;
import io.split.engine.evaluator.Evaluator;

import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import io.split.client.dtos.DataType;
import io.split.engine.evaluator.EvaluationContext;
import io.split.engine.evaluator.Evaluator;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import io.split.client.dtos.DataType;
import io.split.engine.evaluator.EvaluationContext;
import io.split.engine.evaluator.Evaluator;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import io.split.client.dtos.DataType;
import io.split.engine.evaluator.EvaluationContext;
import io.split.engine.evaluator.Evaluator;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.split.engine.matchers.collections;

import io.split.engine.evaluator.EvaluationContext;
import io.split.engine.evaluator.Evaluator;
import io.split.engine.matchers.Matcher;

import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.split.engine.matchers.collections;

import io.split.engine.evaluator.EvaluationContext;
import io.split.engine.evaluator.Evaluator;
import io.split.engine.matchers.Matcher;

import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.split.engine.matchers.collections;

import io.split.engine.evaluator.EvaluationContext;
import io.split.engine.evaluator.Evaluator;
import io.split.engine.matchers.Matcher;

import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.split.engine.matchers.collections;

import io.split.engine.evaluator.EvaluationContext;
import io.split.engine.evaluator.Evaluator;
import io.split.engine.matchers.Matcher;

import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.split.engine.matchers.strings;

import io.split.engine.evaluator.EvaluationContext;
import io.split.engine.evaluator.Evaluator;
import io.split.engine.matchers.Matcher;

import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.split.engine.matchers.strings;

import io.split.engine.evaluator.EvaluationContext;
import io.split.engine.evaluator.Evaluator;
import io.split.engine.matchers.Matcher;

import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.split.engine.matchers.strings;

import io.split.engine.evaluator.EvaluationContext;
import io.split.engine.evaluator.Evaluator;
import io.split.engine.matchers.Matcher;

import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.split.engine.matchers.strings;

import io.split.engine.evaluator.EvaluationContext;
import io.split.engine.evaluator.Evaluator;
import io.split.engine.matchers.Matcher;

import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.split.engine.matchers.strings;

import io.split.engine.evaluator.EvaluationContext;
import io.split.engine.evaluator.Evaluator;
import io.split.engine.matchers.Matcher;

import java.util.Collection;
Expand Down
8 changes: 4 additions & 4 deletions client/src/main/java/io/split/engine/splitter/Splitter.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ public static String getTreatment(String key, int seed, List<Partition> partitio
static long hash(String key, int seed, int algo) {
switch (algo) {
case ALGO_MURMUR:
return murmur_hash(key, seed);
return murmurHash(key, seed);
case ALGO_LEGACY:
default:
return legacy_hash(key, seed);
return legacyHash(key, seed);
}
}

/*package private*/
static long murmur_hash(String key, int seed) {
static long murmurHash(String key, int seed) {
return MurmurHash3.murmurhash3_x86_32(key, 0, key.length(), seed);
}

Expand All @@ -56,7 +56,7 @@ public static int getBucket(String key, int seed, int algo) {
}

/*package private*/
static int legacy_hash(String key, int seed) {
static int legacyHash(String key, int seed) {
int h = 0;
for (int i = 0; i < key.length(); i++) {
h = 31 * h + key.charAt(i);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package io.split.engine.sse.dtos;

import java.util.Map;

public class RawMessageNotification {
private String id;
private String clientId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import pluggable.Pipeline;
import pluggable.Result;

import java.util.ArrayList;
import java.util.List;

public class UserPipelineWrapper implements Pipeline{
Expand Down
30 changes: 15 additions & 15 deletions client/src/main/java/io/split/telemetry/domain/HTTPErrors.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,59 +39,59 @@ public HTTPErrors() {
_telemetry = new ConcurrentHashMap<>();
}

public Map<Long, Long> get_splits() {
public Map<Long, Long> getSplits() {
return _splits;
}

public void set_splits(Map<Long, Long> _splits) {
public void setSplits(Map<Long, Long> _splits) {
this._splits = _splits;
}

public Map<Long, Long> get_segments() {
public Map<Long, Long> getSegments() {
return _segments;
}

public void set_segments(Map<Long, Long> _segments) {
public void setSegments(Map<Long, Long> _segments) {
this._segments = _segments;
}

public Map<Long, Long> get_impressions() {
public Map<Long, Long> getImpressions() {
return _impressions;
}

public void set_impressions(Map<Long, Long> _impressions) {
public void setImpressions(Map<Long, Long> _impressions) {
this._impressions = _impressions;
}

public Map<Long, Long> get_events() {
public Map<Long, Long> getEvents() {
return _events;
}

public void set_events(Map<Long, Long> _events) {
public void setEvents(Map<Long, Long> _events) {
this._events = _events;
}

public Map<Long, Long> get_token() {
public Map<Long, Long> getToken() {
return _token;
}

public void set_token(Map<Long, Long> _token) {
public void setToken(Map<Long, Long> _token) {
this._token = _token;
}

public Map<Long, Long> get_telemetry() {
public Map<Long, Long> getTelemetry() {
return _telemetry;
}

public void set_telemetry(Map<Long, Long> _telemetry) {
public void setTelemetry(Map<Long, Long> _telemetry) {
this._telemetry = _telemetry;
}

public Map<Long, Long> get_impressionsCount() {
public Map<Long, Long> getImpressionsCount() {
return _impressionsCount;
}

public void set_impressionsCount(Map<Long, Long> _impressionsCount) {
public void setImpressionsCount(Map<Long, Long> _impressionsCount) {
this._impressionsCount = _impressionsCount;
}
}
}
30 changes: 15 additions & 15 deletions client/src/main/java/io/split/telemetry/domain/HTTPLatencies.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,59 +39,59 @@ public HTTPLatencies() {
_telemetry = new ArrayList<>();
}

public List<Long> get_splits() {
public List<Long> getSplits() {
return _splits;
}

public void set_splits(List<Long> _splits) {
public void setSplits(List<Long> _splits) {
this._splits = _splits;
}

public List<Long> get_segments() {
public List<Long> getSegments() {
return _segments;
}

public void set_segments(List<Long> _segments) {
public void setSegments(List<Long> _segments) {
this._segments = _segments;
}

public List<Long> get_impressions() {
public List<Long> getImpressions() {
return _impressions;
}

public void set_impressions(List<Long> _impressions) {
public void setImpressions(List<Long> _impressions) {
this._impressions = _impressions;
}

public List<Long> get_events() {
public List<Long> getEvents() {
return _events;
}

public void set_events(List<Long> _events) {
public void setEvents(List<Long> _events) {
this._events = _events;
}

public List<Long> get_token() {
public List<Long> getToken() {
return _token;
}

public void set_token(List<Long> _token) {
public void setToken(List<Long> _token) {
this._token = _token;
}

public List<Long> get_telemetry() {
public List<Long> getTelemetry() {
return _telemetry;
}

public void set_telemetry(List<Long> _telemetry) {
public void setTelemetry(List<Long> _telemetry) {
this._telemetry = _telemetry;
}

public List<Long> get_impressionsCount() {
public List<Long> getImpressionsCount() {
return _impressionsCount;
}

public void set_impressionsCount(List<Long> _impressionsCount) {
public void setImpressionsCount(List<Long> _impressionsCount) {
this._impressionsCount = _impressionsCount;
}
}
}
Loading

0 comments on commit 7506116

Please sign in to comment.