public class TaskLauncherFunction extends Object implements Function<LaunchRequest,Optional<Long>>, org.springframework.beans.factory.InitializingBean
Function that submits a task LaunchRequest to a Data Flow server.
This will check if the Data Flow task platform is at capacity. If not, will submit the
task launch request, otherwise it will return and log a warning message.| Constructor and Description |
|---|
TaskLauncherFunction(org.springframework.cloud.dataflow.rest.client.TaskOperations taskOperations) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
Optional<Long> |
apply(LaunchRequest launchRequest) |
boolean |
platformIsAcceptingNewTasks() |
void |
setPlatformName(String platformName) |
public TaskLauncherFunction(org.springframework.cloud.dataflow.rest.client.TaskOperations taskOperations)
public Optional<Long> apply(LaunchRequest launchRequest)
apply in interface Function<LaunchRequest,Optional<Long>>launchRequest - the task launch request for the Data Flow server.Optional<Long> containing the task Id if the request is accepted or
empty otherwise.public boolean platformIsAcceptingNewTasks()
public void setPlatformName(String platformName)
public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanCopyright © 2020 Pivotal Software, Inc.. All rights reserved.