Class WorkflowExecutorCache
java.lang.Object
io.temporal.internal.worker.WorkflowExecutorCache
-
Constructor Summary
ConstructorsConstructorDescriptionWorkflowExecutorCache(int workflowCacheSize, WorkflowRunLockManager runLockManager, com.uber.m3.tally.Scope scope) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCache(io.temporal.api.common.v1.WorkflowExecution workflowExecution, WorkflowRunTaskHandler workflowRunTaskHandler) booleanevictAnyNotInProcessing(io.temporal.api.common.v1.WorkflowExecution inFavorOfExecution, com.uber.m3.tally.Scope workflowTypeScope) intintintgetOrCreate(io.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponseOrBuilder workflowTask, com.uber.m3.tally.Scope workflowTypeScope, Callable<WorkflowRunTaskHandler> workflowExecutorFn) voidinvalidate(io.temporal.api.common.v1.WorkflowExecution execution, com.uber.m3.tally.Scope workflowTypeScope, String reason, Throwable cause) voidlongsize()
-
Constructor Details
-
WorkflowExecutorCache
public WorkflowExecutorCache(int workflowCacheSize, WorkflowRunLockManager runLockManager, com.uber.m3.tally.Scope scope)
-
-
Method Details
-
getOrCreate
public WorkflowRunTaskHandler getOrCreate(io.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponseOrBuilder workflowTask, com.uber.m3.tally.Scope workflowTypeScope, Callable<WorkflowRunTaskHandler> workflowExecutorFn) throws Exception - Throws:
Exception
-
addToCache
public void addToCache(io.temporal.api.common.v1.WorkflowExecution workflowExecution, WorkflowRunTaskHandler workflowRunTaskHandler) -
evictAnyNotInProcessing
public boolean evictAnyNotInProcessing(io.temporal.api.common.v1.WorkflowExecution inFavorOfExecution, com.uber.m3.tally.Scope workflowTypeScope) - Parameters:
workflowTypeScope- accepts workflow metric scope (tagged with task queue and workflow type)
-
invalidate
-
size
public long size() -
invalidateAll
public void invalidateAll() -
getCacheHits
public int getCacheHits() -
getCacheMisses
public int getCacheMisses() -
getCurrentCacheSize
public int getCurrentCacheSize()
-