Client interfaces
See original GitHub issueI’m wondering if it could make sense to enhance client interface with convenient methods i.e:
- Options should not be mandatory:
ListenableFuture<PutResponse> put(ByteString key, ByteString value);
- Leverage java 8 functional interfaces (if project will be moved to java 8 of course):
void put(
ByteString key, ByteString value,
PutOption option,
Consumer<PutResponse> onResponse, Consumer<Throwable> onError);
void put(
ByteString key, ByteString value,
Consumer<PutResponse> onResponse, Consumer<Throwable> onError);
void put(
ByteString key, ByteString value,
Consumer<PutResponse> onResponse); throws an RuntimeException in case of error
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Overview of client interfaces - 21744 - Universal Robots
UR robot can interact with external devices by different types of communication interfaces. ... A Universal Robot can be controlled from remote by ......
Read more >Client Interface - an overview | ScienceDirect Topics
This interface represents the set of services and parameter lists that the client expects the Hardware Proxy to provide. As an interface, it...
Read more >Definition of the client interface - Progress Documentation
The Open Client object model, which is the basis of the client interface definition, consists of three types of interface objects that model...
Read more >Documentation: 15: Part IV. Client Interfaces - PostgreSQL
Part IV. Client Interfaces. This part describes the client programming interfaces distributed with PostgreSQL. Each of these chapters can be read independently.
Read more >Client interface
The client interface API section defines the functions that client applications can use to connect to mm-sync, start and monitor synchronizations, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My preference would be to return java 8 CompletableFuture on any of those put calls. It seems to be the route for futures/listeners in java going forward. You would then be able to do this:
or just
future.get()
for sync call and throws ExecutionExceptionMore: http://www.nurkiewicz.com/2013/05/java-8-definitive-guide-to.html http://download.java.net/lambda/b88/docs/api/java/util/concurrent/CompletableFuture.html
FYI, as I mentioned here, I think we should avoid exposing ByteString as a part of API generated by protobuf directly.