Package io.deephaven.server.table.ops
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,SliceGrpcImpl,SnapshotTableGrpcImpl,SnapshotWhenTableGrpcImpl,SortTableGrpcImpl,TimeTableGrpcImpl,UngroupGrpcImpl,UnstructuredFilterTableGrpcImpl,UpdateByGrpcImpl,UpdateOrSelectGrpcImpl,WhereInGrpcImpl
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceprotected static interface -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGrpcTableOperation(GrpcTableOperation.PermissionFunction<T> permission, Function<io.deephaven.proto.backplane.grpc.BatchTableRequest.Operation, T> getRequest, Function<T, io.deephaven.proto.backplane.grpc.Ticket> getTicket) This table operation has no dependencies.protectedGrpcTableOperation(GrpcTableOperation.PermissionFunction<T> permission, Function<io.deephaven.proto.backplane.grpc.BatchTableRequest.Operation, T> getRequest, Function<T, io.deephaven.proto.backplane.grpc.Ticket> getTicket, GrpcTableOperation.MultiDependencyFunction<T> getDependencies) This table operation has many dependencies.protectedGrpcTableOperation(GrpcTableOperation.PermissionFunction<T> permission, Function<io.deephaven.proto.backplane.grpc.BatchTableRequest.Operation, T> getRequest, Function<T, io.deephaven.proto.backplane.grpc.Ticket> getTicket, Function<T, io.deephaven.proto.backplane.grpc.TableReference> getDependency) This table operation has one dependency. -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckPermission(T request, List<SessionState.ExportObject<io.deephaven.engine.table.Table>> sourceTables) Verify that this request is allowed to be performed.abstract io.deephaven.engine.table.Tablecreate(T request, List<SessionState.ExportObject<io.deephaven.engine.table.Table>> sourceTables) This actually performs the operation.getRequestFromOperation(io.deephaven.proto.backplane.grpc.BatchTableRequest.Operation op) Extract the specific request object from the batch operation.io.deephaven.proto.backplane.grpc.TicketgetResultTicket(T request) Get the result ticket for this operation.List<io.deephaven.proto.backplane.grpc.TableReference>getTableReferences(T request) Get the table references for this operation.voidvalidateRequest(T request) This method validates preconditions of the request.
-
Constructor Details
-
GrpcTableOperation
protected GrpcTableOperation(GrpcTableOperation.PermissionFunction<T> permission, Function<io.deephaven.proto.backplane.grpc.BatchTableRequest.Operation, T> getRequest, Function<T, io.deephaven.proto.backplane.grpc.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 requestgetRequest- a functor to extract the request from a BatchTableRequest.OperationgetTicket- a function to extract the result ticket from the requestgetDependencies- a function to extract the table-reference dependencies from the request
-
GrpcTableOperation
protected GrpcTableOperation(GrpcTableOperation.PermissionFunction<T> permission, Function<io.deephaven.proto.backplane.grpc.BatchTableRequest.Operation, T> getRequest, Function<T, io.deephaven.proto.backplane.grpc.Ticket> getTicket, Function<T, io.deephaven.proto.backplane.grpc.TableReference> getDependency) This table operation has one dependency.- Parameters:
permission- a function to validate the request given the auth context, source tables and requestgetRequest- a function to extract the request from a BatchTableRequest.OperationgetTicket- a function to extract the result ticket from the requestgetDependency- a function to extract the table-reference dependency from the request
-
GrpcTableOperation
protected GrpcTableOperation(GrpcTableOperation.PermissionFunction<T> permission, Function<io.deephaven.proto.backplane.grpc.BatchTableRequest.Operation, T> getRequest, Function<T, io.deephaven.proto.backplane.grpc.Ticket> getTicket) This table operation has no dependencies.- Parameters:
permission- a function to validate the request given the auth context, source tables and requestgetRequest- a functor to extract the request from a BatchTableRequest.OperationgetTicket- a function to extract the result ticket from the request
-
-
Method Details
-
validateRequest
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 io.deephaven.engine.table.Table create(T request, List<SessionState.ExportObject<io.deephaven.engine.table.Table>> sourceTables) This actually performs the operation. It will typically be performed after the- Parameters:
request- the original request from the usersourceTables- the source tables that this operation may or may not need- Returns:
- the resulting table
-
getRequestFromOperation
Extract the specific request object from the batch operation.- Parameters:
op- the batch operation- Returns:
- the typed request from the batch
-
getResultTicket
Get the result ticket for this operation.- Parameters:
request- the request- Returns:
- the result ticket
-
getTableReferences
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<io.deephaven.engine.table.Table>> sourceTables) Verify that this request is allowed to be performed.- Parameters:
request- the original request from the usersourceTables- the source tables that this operation may or may not need
-