Create the Mesos scheduler driver based on this configuration.
@param scheduler the scheduler to use.
@param implicitAcknowledgements whether to configure the driver for implicit acknowledgements.
@return a scheduler driver.
542815
public SchedulerDriver createDriver(Scheduler scheduler, boolean implicitAcknowledgements) {
		MesosSchedulerDriver schedulerDriver;
		if (this.credential().isDefined()) {
			schedulerDriver =
				new MesosSchedulerDriver(scheduler, frameworkInfo.build(), this.masterUrl(),
					implicitAcknowledgements, this.credential().get().build());
		}
		else {
			schedulerDriver =
				new MesosSchedulerDriver(scheduler, frameworkInfo.build(), this.masterUrl(),
					implicitAcknowledgements);
		}
		return schedulerDriver;
	}
471445
public static Schedulers newThreadPoolScheduler(int poolSize) {
        createSingleton();
        Schedulers.increaseNoOfSchedullers();
        ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
        CustomizableThreadFactory factory = new CustomizableThreadFactory();
        scheduler.initializeExecutor(factory, new RejectedExecutionHandler() {
            @Override
            public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
                System.out.println("asdsa");
            }
        });
        scheduler.setPoolSize(poolSize);
        instance.setCurrentScheduler(scheduler);
        return instance;
    }
789093
protected void scheduleAsyncPersist() throws IOException {
    try (CloseableResource<FileSystemMasterClient> masterClient = mContext
        .acquireMasterClientResource()) {
      ScheduleAsyncPersistencePOptions persistOptions =
          FileSystemOptions.scheduleAsyncPersistDefaults(mContext.getPathConf(mUri)).toBuilder()
              .setCommonOptions(mOptions.getCommonOptions()).build();
      masterClient.get().scheduleAsyncPersist(mUri, persistOptions);
    }
  }
69143
public void createVolatileScheduler (final int nMaxThreads) throws SchedulerException
  {
    final SimpleThreadPool aThreadPool = new SimpleThreadPool (nMaxThreads, Thread.NORM_PRIORITY);
    aThreadPool.initialize ();
    final IJobStore jobStore = new RAMJobStore ();
    createScheduler (aThreadPool, jobStore);
  }
761946
private void scheduleAcknowledgment(final String topic) {
    if (!acknowledgeScheduled.has(topic)) {
      acknowledgeScheduled.set(topic, true);
      Platform.scheduler().scheduleDelay(acknowledgeDelayMillis, new Handler<Void>() {
        @Override
        public void handle(Void event) {
          if (acknowledgeScheduled.has(topic)) {
            acknowledgeScheduled.remove(topic);
            // Check we're still out of date, and not already catching up.
            double knownHeadSequence = knownHeadSequences.getNumber(topic);
            double currentSequence = currentSequences.getNumber(topic);
            if (knownHeadSequence > currentSequence
                && (!acknowledgeNumbers.has(topic) || knownHeadSequence > acknowledgeNumbers
                    .getNumber(topic))) {
              acknowledgeNumbers.set(topic, knownHeadSequence);
              log.log(Level.CONFIG, "Catching up to " + knownHeadSequence);
              catchup(topic, currentSequence);
            } else {
              log.log(Level.FINE, "No need to catchup");
            }
          }
        }
      });
    }
  }
454841
public <T extends ThreadPoolTaskScheduler> T configure(T taskScheduler) {
		PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull();
		map.from(this.poolSize).to(taskScheduler::setPoolSize);
		map.from(this.awaitTermination)
				.to(taskScheduler::setWaitForTasksToCompleteOnShutdown);
		map.from(this.awaitTerminationPeriod).asInt(Duration::getSeconds)
				.to(taskScheduler::setAwaitTerminationSeconds);
		map.from(this.threadNamePrefix).to(taskScheduler::setThreadNamePrefix);
		if (!CollectionUtils.isEmpty(this.customizers)) {
			this.customizers.forEach((customizer) -> customizer.customize(taskScheduler));
		}
		return taskScheduler;
	}
317493
protected void startSchedulerDriver() {
    // start the driver non-blocking,
    // since we need to set heron state after the scheduler driver is started.
    // Heron will block the main thread eventually
    driver.start();

    // Staging the Mesos Framework
    LOG.info("Waiting for Mesos Framework get registered");
    long timeout = MesosContext.getHeronMesosFrameworkStagingTimeoutMs(config);
    if (!mesosFramework.waitForRegistered(timeout, TimeUnit.MILLISECONDS)) {
      throw new RuntimeException("Failed to register with Mesos Master in time");
    }
  }
804140
public CacheConfigurationBuilder<K, V> withClassLoader(ClassLoader classLoader) {
    CacheConfigurationBuilder<K, V> otherBuilder = new CacheConfigurationBuilder<>(this);
    otherBuilder.classLoader = classLoader;
    return otherBuilder;
  }
1163064
@Deprecated
  public AndroidChannelBuilder scheduledExecutorService(
      ScheduledExecutorService scheduledExecutorService) {
    try {
      OKHTTP_CHANNEL_BUILDER_CLASS
          .getMethod("scheduledExecutorService", ScheduledExecutorService.class)
          .invoke(delegateBuilder, scheduledExecutorService);
      return this;
    } catch (Exception e) {
      throw new RuntimeException(
          "Failed to invoke scheduledExecutorService on delegate builder", e);
    }
  }
1105768
public void setScheduleDefinitions(java.util.Collection<String> scheduleDefinitions) {
        if (scheduleDefinitions == null) {
            this.scheduleDefinitions = null;
            return;
        }

        this.scheduleDefinitions = new com.amazonaws.internal.SdkInternalList<String>(scheduleDefinitions);
    }
1316393
public Scheduler getScheduler() {
    if (scheduler == null) {
      scheduler = new Scheduler();
      scheduler.setDaemon(true);
      scheduler.start();
    }
    return scheduler;
  }
445843
public static boolean setSchedulerLocation(
      Config runtime,
      String schedulerEndpoint,
      IScheduler scheduler) {

    // Set scheduler location to host:port by default. Overwrite scheduler location if behind DNS.
    Scheduler.SchedulerLocation.Builder builder = Scheduler.SchedulerLocation.newBuilder()
        .setTopologyName(Runtime.topologyName(runtime))
        .setHttpEndpoint(schedulerEndpoint);

    // Set the job link in SchedulerLocation if any
    List<String> jobLinks = scheduler.getJobLinks();
    // Check whether IScheduler provides valid job link
    if (jobLinks != null) {
      builder.addAllJobPageLink(jobLinks);
    }

    Scheduler.SchedulerLocation location = builder.build();

    LOG.log(Level.INFO, "Setting Scheduler locations: {0}", location);
    SchedulerStateManagerAdaptor statemgr = Runtime.schedulerStateManagerAdaptor(runtime);
    Boolean result =
        statemgr.setSchedulerLocation(location, Runtime.topologyName(runtime));

    if (result == null || !result) {
      LOG.severe("Failed to set Scheduler location");
      return false;
    }

    return true;
  }
1309575
public static KnowledgeBuilderConfiguration newKnowledgeBuilderConfiguration(Properties properties,
                                                                                 ClassLoader... classLoaders) {
        return FactoryServiceHolder.factoryService.newKnowledgeBuilderConfiguration( properties, classLoaders );
    }
305623
public Database asynchronous(final Scheduler nonTransactionalScheduler) {
        return asynchronous(new Func0<Scheduler>() {
            @Override
            public Scheduler call() {
                return nonTransactionalScheduler;
            }
        });
    }
289958
def scheduler(self):
        """"""
        if self._scheduler is None:
            self._scheduler = xenon.Scheduler.create(**self.scheduler_args)

        return self._scheduler
593968
public static <T extends Actor> T AsActor(Class<T> actorClazz, Scheduler scheduler, int qsize) {
        return (T) instance.newProxy(actorClazz,scheduler,qsize);
    }
289732
public static FastForwardReporter create(
      MetricRegistry registry,
      Optional<HostAndPort> address,
      String metricKey, int intervalSeconds,
      Supplier<Map<String, String>> additionalAttributes)
      throws SocketException, UnknownHostException {

    final FastForward ff;
    if (address.isPresent()) {
      ff = FastForward.setup(address.get().getHost(), address.get().getPort());
    } else {
      ff = FastForward.setup();
    }

    final ThreadFactory threadFactory = new ThreadFactoryBuilder()
        .setDaemon(true)
        .setNameFormat("fast-forward-reporter-%d")
        .build();

    final ScheduledExecutorService executorService =
        Executors.newSingleThreadScheduledExecutor(threadFactory);

    return new FastForwardReporter(ff, registry, executorService, metricKey, intervalSeconds,
        TimeUnit.SECONDS, additionalAttributes);
  }