Class GrpcClientExecuteQuery


  • public class GrpcClientExecuteQuery
    extends Object
    This is a runnable code example explained in detail in the README.md file in this repo. To run this example, you need to have a running Stargate instance. On default, it assumes that the Stargate instance is running on localhost:8090. If you need to change it, please adapt the STARGATE_HOST and/or STARGATE_GRPC_PORT. Lastly, it requires the Stargate Token to perform auth logic. Please set it in the: STARGATE_TOKEN.

    It executes:

    1. DDL to setup keyspace and table
    2. Blocking insert and data retrieval for single element
    3. Blocking insert and data retrieval for batch of elements
    4. Async query
    • Constructor Detail

      • GrpcClientExecuteQuery

        public GrpcClientExecuteQuery()
        Construct client for accessing StargateGrpc server using a new channel.
    • Method Detail

      • executeSingleQuery

        public void executeSingleQuery()
      • executeSingleQueryParameterized

        public void executeSingleQueryParameterized()
      • createChannel

        public io.grpc.ManagedChannel createChannel​(String host,
                                                    int port)