class InMemoryJobService extends JobServiceGrpc.JobServiceImplBase implements FnService {

  public static InMemoryJobService create(
      Endpoints.ApiServiceDescriptor stagingServiceDescriptor,
      Function<String, String> stagingServiceTokenProvider,
      ThrowingConsumer<Exception, String> cleanupJobFn,
      JobInvoker invoker) {
    return new InMemoryJobService(
        stagingServiceDescriptor,
        stagingServiceTokenProvider,
        cleanupJobFn,
        invoker,
        DEFAULT_MAX_INVOCATION_HISTORY);
  }

  private  InMemoryJobService(
      Endpoints.ApiServiceDescriptor stagingServiceDescriptor,
      Function<String, String> stagingServiceTokenProvider,
      ThrowingConsumer<Exception, String> cleanupJobFn,
      JobInvoker invoker,
      int maxInvocationHistory);

}