Class TXNGrpc.TXNStub

java.lang.Object
io.grpc.stub.AbstractStub<S>
io.grpc.stub.AbstractAsyncStub<TXNGrpc.TXNStub>
org.vitrivr.cottontail.grpc.TXNGrpc.TXNStub
Enclosing class:
TXNGrpc

public static final class TXNGrpc.TXNStub extends io.grpc.stub.AbstractAsyncStub<TXNGrpc.TXNStub>
A stub to allow clients to do asynchronous rpc calls to service TXN.

 Endpoint for transaction management.
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub

    io.grpc.stub.AbstractStub.StubFactory<T extends io.grpc.stub.AbstractStub<T>>
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    TXNStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    begin(CottontailGrpc.BeginTransaction request, io.grpc.stub.StreamObserver<CottontailGrpc.ResponseMetadata> responseObserver)
    Starts a new transaction.
    protected TXNGrpc.TXNStub
    build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
     
    void
    commit(CottontailGrpc.RequestMetadata request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
    Performs a commit on a transaction.
    void
    kill(CottontailGrpc.RequestMetadata request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
    Kills and performs a rollback on an ongoing transaction.
    void
    listLocks(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver<CottontailGrpc.QueryResponseMessage> responseObserver)
    Lists all active locks on database objects.
    void
    listTransactions(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver<CottontailGrpc.QueryResponseMessage> responseObserver)
    Lists all active transactions.
    void
    rollback(CottontailGrpc.RequestMetadata request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
    Performs a rollback on a transaction and aborts it.

    Methods inherited from class io.grpc.stub.AbstractAsyncStub

    newStub, newStub

    Methods inherited from class io.grpc.stub.AbstractStub

    getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOption, withWaitForReady

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TXNStub

      private TXNStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
  • Method Details

    • build

      protected TXNGrpc.TXNStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
      Specified by:
      build in class io.grpc.stub.AbstractStub<TXNGrpc.TXNStub>
    • begin

      public void begin(CottontailGrpc.BeginTransaction request, io.grpc.stub.StreamObserver<CottontailGrpc.ResponseMetadata> responseObserver)
       Starts a new transaction. 
       
    • commit

      public void commit(CottontailGrpc.RequestMetadata request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
       Performs a commit on a transaction. This method blocks if a query is currently executed. 
       
    • rollback

      public void rollback(CottontailGrpc.RequestMetadata request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
       Performs a rollback on a transaction and aborts it. This method blocks if a query is currently executed. 
       
    • kill

      public void kill(CottontailGrpc.RequestMetadata request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
       Kills and performs a rollback on an ongoing transaction. This method can even be used when a query is being executed.
       
    • listTransactions

      public void listTransactions(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver<CottontailGrpc.QueryResponseMessage> responseObserver)
       Lists all active transactions. 
       
    • listLocks

      public void listLocks(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver<CottontailGrpc.QueryResponseMessage> responseObserver)
       Lists all active locks on database objects.