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
Modifier and TypeClassDescriptionprotected static interface
protected static interface
-
Constructor Summary
ModifierConstructorDescriptionprotected
GrpcTableOperation
(GrpcTableOperation.PermissionFunction<T> permission, Function<BatchTableRequest.Operation, T> getRequest, Function<T, Ticket> getTicket) This table operation has no dependencies.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.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. -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkPermission
(T request, List<SessionState.ExportObject<Table>> sourceTables) Verify that this request is allowed to be performed.abstract Table
create
(T request, List<SessionState.ExportObject<Table>> sourceTables) This actually performs the operation.Extract the specific request object from the batch operation.getResultTicket
(T request) Get the result ticket for this operation.getTableReferences
(T request) Get the table references for this operation.void
validateRequest
(T request) This method validates preconditions of the request.
-
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 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<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 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<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 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
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
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
-