Class WorkflowExecutorCache

java.lang.Object
io.temporal.internal.worker.WorkflowExecutorCache

@ThreadSafe public final class WorkflowExecutorCache extends Object
  • 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

      public void invalidate(io.temporal.api.common.v1.WorkflowExecution execution, com.uber.m3.tally.Scope workflowTypeScope, String reason, Throwable cause)
    • size

      public long size()
    • invalidateAll

      public void invalidateAll()
    • getCacheHits

      public int getCacheHits()
    • getCacheMisses

      public int getCacheMisses()
    • getCurrentCacheSize

      public int getCurrentCacheSize()