Skip to content

Commit 16ef432

Browse files
oliviarlajhpark816
authored andcommitted
INTERNAL: Remove GenericTranscoder for AsyncArcusCommands
1 parent 261bbdc commit 16ef432

3 files changed

Lines changed: 8 additions & 133 deletions

File tree

src/main/java/net/spy/memcached/ArcusClient.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,10 @@ private void validateMKey(String mkey) {
465465
}
466466
}
467467

468+
public Transcoder<Object> getCollectionTranscoder() {
469+
return collectionTranscoder;
470+
}
471+
468472
public <T> AsyncArcusCommands<T> asyncCommands() {
469473
return new AsyncArcusCommands<>(() -> this);
470474
}

src/main/java/net/spy/memcached/v2/AsyncArcusCommands.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@
2525
public class AsyncArcusCommands<T> {
2626

2727
private final Transcoder<T> tc;
28+
private final Transcoder<T> tcForCollection;
2829

2930
private final Supplier<ArcusClient> arcusClientSupplier;
3031

32+
@SuppressWarnings("unchecked")
3133
public AsyncArcusCommands(Supplier<ArcusClient> arcusClientSupplier) {
32-
this.tc = new GenericTranscoder<>();
34+
this.tc = (Transcoder<T>) arcusClientSupplier.get().getTranscoder();
35+
this.tcForCollection = (Transcoder<T>) arcusClientSupplier.get().getCollectionTranscoder();
3336
this.arcusClientSupplier = arcusClientSupplier;
3437
}
3538

src/main/java/net/spy/memcached/v2/GenericTranscoder.java

Lines changed: 0 additions & 132 deletions
This file was deleted.

0 commit comments

Comments
 (0)