/** * Builds the {@link Client} instance. * * @return a fully-configured {@link Client} */ public Client build(String name) { if ((environment == null) && ((executorService == null) || (objectMapper == null))) { throw new IllegalStateException("Must have either an environment or both " + "an executor service and an object mapper"); } if (executorService == null) { // Create an ExecutorService based on the provided // configuration. The DisposableExecutorService decorator // is used to ensure that the service is shut down if the // Jersey client disposes of it. executorService = requireNonNull(environment).lifecycle() .executorService("jersey-client-" + name + "-%d") .minThreads(configuration.getMinThreads()) .maxThreads(configuration.getMaxThreads()) .workQueue(new ArrayBlockingQueue<>(configuration.getWorkQueueSize())) .build(); } if (objectMapper == null) { objectMapper = requireNonNull(environment).getObjectMapper(); } if (environment != null) { validator = environment.getValidator(); } return build(name, executorService, objectMapper, validator); }
this.healthCheckExecutorService = this.lifecycle().executorService("TimeBoundHealthCheck-pool-%d") .workQueue(new ArrayBlockingQueue<>(1)) .minThreads(1)
/** * Same as {@link LifecycleEnvironment#executorService(String)} * * @param nameFormat name format * @return builder */ public ExecutorServiceBuilder executorService(String nameFormat) { return environment.executorService(nameFormat); }
this.healthCheckExecutorService = this.lifecycle().executorService("TimeBoundHealthCheck-pool-%d") .workQueue(new ArrayBlockingQueue<>(1)) .minThreads(1)
environment.lifecycle().executorService("dataSet").build(), securityConfig.getPermissionFetcher(), configuration.getDatabases(), new ResourceSyncFileLoader(httpClient), resourceSyncService, environment.lifecycle().executorService("GraphQLSchemaUpdate").maxThreads(1).build() ), serializerWriterRegistry, register(environment, new VreImage(transactionEnforcer)); final ExecutorService rfdExecutorService = environment.lifecycle().executorService("rdf-import").build(); register(environment, new ImportRdf(graphManager, vres, rfdExecutorService, transactionEnforcer)); register(environment, new Import(