Skip to content

Commit

Permalink
Removed bin name as config param
Browse files Browse the repository at this point in the history
  • Loading branch information
yterentiev committed Jun 14, 2018
1 parent 795f2d8 commit b82e088
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

@Slf4j
public class AerospikeReadListener implements RecordListener {
private final static String NAME = "test";
private final static String NAME = "cache";
private final MonoSink<String> sink;
private final String recordKeyId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public class AerospikePropertyConfiguration {
private Long maxBackoff;
private int maxRetry;
private String namespace;
private String binName;

private static final int DEFAULT_PORT = 3000;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public class AerospikeRepositoryImpl implements ReactiveRepository<PayloadWrappe
private final Policy policy;
private WritePolicy writePolicy;

private final static String BIN_NAME="cache";

@Override
public Mono save(final PayloadWrapper wrapper) {
long expiry;
Expand All @@ -56,7 +58,7 @@ public Mono save(final PayloadWrapper wrapper) {
return Mono.<String>create(sink -> client.put(eventLoops.next(),
new AerospikeWriteListener(sink, normalizedId), policy,
new Key(configuration.getNamespace(), "", normalizedId),
new Bin(configuration.getBinName(), Json.toJson(wrapper)))).map(payload -> wrapper)
new Bin(BIN_NAME, Json.toJson(wrapper)))).map(payload -> wrapper)
.retryWhen(getRetryPolicy());
}

Expand Down
1 change: 0 additions & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ spring:
max_backoff: 1000
max_retry: 3
namespace: "prebid_cache"
bin_name: "cache"
#spring.redis.sentinel.master: mymaster
#spring.redis.sentinel.nodes: localhost:26379

Expand Down

0 comments on commit b82e088

Please sign in to comment.