-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move MsgPack object mapping up from connection level
This patch is a part of the global task of decoupling the MessagePack object mapping from the core driver code in the scope of discoverable mapper bindings, caching and support for different Tarantool cluster implementations
- Loading branch information
Showing
10 changed files
with
45 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ tmp/ | |
*.swo | ||
.bloop/ | ||
.metals/ | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 7 additions & 13 deletions
20
src/main/java/io/tarantool/driver/core/TarantoolRequestMetadata.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,22 @@ | ||
package io.tarantool.driver.core; | ||
|
||
import io.tarantool.driver.mappers.MessagePackValueMapper; | ||
|
||
import java.util.concurrent.CompletableFuture; | ||
|
||
import org.msgpack.value.Value; | ||
|
||
/** | ||
* Intermediate request metadata holder | ||
* | ||
* @author Alexey Kuzin | ||
*/ | ||
public class TarantoolRequestMetadata { | ||
private final CompletableFuture<?> feature; | ||
private final MessagePackValueMapper mapper; | ||
|
||
protected TarantoolRequestMetadata(CompletableFuture<?> feature, MessagePackValueMapper mapper) { | ||
this.feature = feature; | ||
this.mapper = mapper; | ||
} | ||
private final CompletableFuture<Value> future; | ||
|
||
public CompletableFuture<?> getFuture() { | ||
return feature; | ||
protected TarantoolRequestMetadata(CompletableFuture<Value> future) { | ||
this.future = future; | ||
} | ||
|
||
public MessagePackValueMapper getMapper() { | ||
return mapper; | ||
public CompletableFuture<Value> getFuture() { | ||
return future; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters