Class GrpcTableOperation<T>

java.lang.Object
io.deephaven.server.table.ops.GrpcTableOperation<T>
Direct Known Subclasses:
AggregateAllGrpcImpl, AggregateGrpcImpl, AjRajGrpcImpl, ApplyPreviewColumnsGrpcImpl, ColumnStatisticsGrpcImpl, ComboAggregateGrpcImpl, CreateInputTableGrpcImpl, DropColumnsGrpcImpl, EmptyTableGrpcImpl, FetchTableGrpcImpl, FilterTableGrpcImpl, FlattenTableGrpcImpl, HeadOrTailByGrpcImpl, HeadOrTailGrpcImpl, JoinTablesGrpcImpl, MergeTablesGrpcImpl, MetaTableGrpcImpl, MultiJoinGrpcImpl, RangeJoinGrpcImpl, RunChartDownsampleGrpcImpl, SelectDistinctGrpcImpl, SnapshotTableGrpcImpl, SnapshotWhenTableGrpcImpl, SortTableGrpcImpl, TimeTableGrpcImpl, UngroupGrpcImpl, UnstructuredFilterTableGrpcImpl, UpdateByGrpcImpl, UpdateOrSelectGrpcImpl, WhereInGrpcImpl

public abstract class GrpcTableOperation<T> extends Object
  • Constructor Details

    • GrpcTableOperation

      protected GrpcTableOperation(GrpcTableOperation.PermissionFunction<T> permission, Function<BatchTableRequest.Operation,T> getRequest, Function<T,Ticket> getTicket, GrpcTableOperation.MultiDependencyFunction<T> getDependencies)
      This table operation has many dependencies.
      Parameters:
      permission - a function to validate the request given the auth context, source tables and request
      getRequest - a functor to extract the request from a BatchTableRequest.Operation
      getTicket - a function to extract the result ticket from the request
      getDependencies - a function to extract the table-reference dependencies from the request
    • GrpcTableOperation

      protected GrpcTableOperation(GrpcTableOperation.PermissionFunction<T> permission, Function<BatchTableRequest.Operation,T> getRequest, Function<T,Ticket> getTicket, Function<T,TableReference> getDependency)
      This table operation has one dependency.
      Parameters:
      permission - a function to validate the request given the auth context, source tables and request
      getRequest - a function to extract the request from a BatchTableRequest.Operation
      getTicket - a function to extract the result ticket from the request
      getDependency - a function to extract the table-reference dependency from the request
    • GrpcTableOperation

      protected GrpcTableOperation(GrpcTableOperation.PermissionFunction<T> permission, Function<BatchTableRequest.Operation,T> getRequest, Function<T,Ticket> getTicket)
      This table operation has no dependencies.
      Parameters:
      permission - a function to validate the request given the auth context, source tables and request
      getRequest - a functor to extract the request from a BatchTableRequest.Operation
      getTicket - a function to extract the result ticket from the request
  • Method Details

    • validateRequest

      public void validateRequest(T request) throws io.grpc.StatusRuntimeException
      This method validates preconditions of the request.
      Parameters:
      request - the original request from the user
      Throws:
      io.grpc.StatusRuntimeException - on the first failed precondition
    • create

      public abstract Table create(T request, List<SessionState.ExportObject<Table>> sourceTables)
      This actually performs the operation. It will typically be performed after the
      Parameters:
      request - the original request from the user
      sourceTables - the source tables that this operation may or may not need
      Returns:
      the resulting table
    • getRequestFromOperation

      public T getRequestFromOperation(BatchTableRequest.Operation op)
      Extract the specific request object from the batch operation.
      Parameters:
      op - the batch operation
      Returns:
      the typed request from the batch
    • getResultTicket

      public Ticket getResultTicket(T request)
      Get the result ticket for this operation.
      Parameters:
      request - the request
      Returns:
      the result ticket
    • getTableReferences

      public List<TableReference> getTableReferences(T request)
      Get the table references for this operation.
      Parameters:
      request - the request
      Returns:
      the table references of the other source table dependencies
    • checkPermission

      public void checkPermission(T request, List<SessionState.ExportObject<Table>> sourceTables)
      Verify that this request is allowed to be performed.
      Parameters:
      request - the original request from the user
      sourceTables - the source tables that this operation may or may not need