Class BenchOperation
- java.lang.Object
 - 
- org.linuxforhealth.fhir.server.spi.operation.AbstractOperation
 - 
- org.linuxforhealth.fhir.operation.bench.BenchOperation
 
 
 
- 
- All Implemented Interfaces:
 FHIROperation
public class BenchOperation extends AbstractOperation
Custom operation to consume some CPU load to help out with understanding the relative performance of systems. This is particularly useful deploying in a cloud environment like K8s where the worker nodes are virtual, so you don't really know how much capacity a vCPU actually gives you. The operation has 2 parameters: threads - how many threads to spin up size - how much "work" to perform 
- 
- 
Field Summary
- 
Fields inherited from class org.linuxforhealth.fhir.server.spi.operation.AbstractOperation
definition 
 - 
 
- 
Constructor Summary
Constructors Constructor Description BenchOperation() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OperationDefinitionbuildOperationDefinition()protected ParametersdoInvoke(FHIROperationContext operationContext, java.lang.Class<? extends Resource> resourceType, java.lang.String logicalId, java.lang.String versionId, Parameters parameters, FHIRResourceHelpers resourceHelper, SearchHelper searchHelper)This is the method that concrete subclasses must implement to perform the operation logic.protected booleanisAbstractResourceTypesDisallowed()Determines if the operation disallows abstract resource types, Resource and DomainResource.- 
Methods inherited from class org.linuxforhealth.fhir.server.spi.operation.AbstractOperation
buildExceptionWithIssue, buildExceptionWithIssue, countParameters, findOpDefParameter, getDefinition, getName, getParameter, getParameterDefinitions, getParameters, getResourceTypeNames, invoke, isAdditionalMethodAllowed, validateInputParameters, validateOperationContext, validateOutputParameters, validateParameters 
 - 
 
 - 
 
- 
- 
Method Detail
- 
buildOperationDefinition
protected OperationDefinition buildOperationDefinition()
- Specified by:
 buildOperationDefinitionin classAbstractOperation
 
- 
isAbstractResourceTypesDisallowed
protected boolean isAbstractResourceTypesDisallowed()
Description copied from class:AbstractOperationDetermines if the operation disallows abstract resource types, Resource and DomainResource. TODO: Remove this method when Issue #2526 is implemented, at which time, abstract resource types will be disallowed for any operation.- Overrides:
 isAbstractResourceTypesDisallowedin classAbstractOperation- Returns:
 - true or false
 
 
- 
doInvoke
protected Parameters doInvoke(FHIROperationContext operationContext, java.lang.Class<? extends Resource> resourceType, java.lang.String logicalId, java.lang.String versionId, Parameters parameters, FHIRResourceHelpers resourceHelper, SearchHelper searchHelper) throws FHIROperationException
Description copied from class:AbstractOperationThis is the method that concrete subclasses must implement to perform the operation logic.- Specified by:
 doInvokein classAbstractOperation- Returns:
 - the Parameters object to return or null if there is no response Parameters object to return
 - Throws:
 FHIROperationException
 
 - 
 
 -