diff --git a/core/src/main/java/com/netflix/conductor/core/WorkflowContext.java b/core/src/main/java/com/netflix/conductor/core/WorkflowContext.java index d870761c53..2f996a47a6 100644 --- a/core/src/main/java/com/netflix/conductor/core/WorkflowContext.java +++ b/core/src/main/java/com/netflix/conductor/core/WorkflowContext.java @@ -44,16 +44,12 @@ public static void unset() { THREAD_LOCAL.remove(); } - /** - * @return the clientApp - */ + /** @return the clientApp */ public String getClientApp() { return clientApp; } - /** - * @return the username - */ + /** @return the username */ public String getUserName() { return userName; } diff --git a/core/src/main/java/com/netflix/conductor/core/config/ConductorProperties.java b/core/src/main/java/com/netflix/conductor/core/config/ConductorProperties.java index 50edbf55af..dd60c651c2 100644 --- a/core/src/main/java/com/netflix/conductor/core/config/ConductorProperties.java +++ b/core/src/main/java/com/netflix/conductor/core/config/ConductorProperties.java @@ -521,9 +521,7 @@ public void setTaskExecLogSizeLimit(int taskExecLogSizeLimit) { this.taskExecLogSizeLimit = taskExecLogSizeLimit; } - /** - * @return Returns all the configurations in a map. - */ + /** @return Returns all the configurations in a map. */ public Map getAll() { Map map = new HashMap<>(); Properties props = System.getProperties(); diff --git a/core/src/main/java/com/netflix/conductor/core/dal/ExecutionDAOFacade.java b/core/src/main/java/com/netflix/conductor/core/dal/ExecutionDAOFacade.java index 05de6947a2..3c219e5749 100644 --- a/core/src/main/java/com/netflix/conductor/core/dal/ExecutionDAOFacade.java +++ b/core/src/main/java/com/netflix/conductor/core/dal/ExecutionDAOFacade.java @@ -214,8 +214,7 @@ public List getWorkflowsByCorrelationId( .filter(Objects::nonNull) .collect(Collectors.toList()); } - return executionDAO - .getWorkflowsByCorrelationId(workflowName, correlationId, includeTasks) + return executionDAO.getWorkflowsByCorrelationId(workflowName, correlationId, includeTasks) .stream() .map(WorkflowModel::toWorkflow) .collect(Collectors.toList()); diff --git a/core/src/main/java/com/netflix/conductor/core/events/queue/Message.java b/core/src/main/java/com/netflix/conductor/core/events/queue/Message.java index b7d33961fc..7db1ac56d7 100644 --- a/core/src/main/java/com/netflix/conductor/core/events/queue/Message.java +++ b/core/src/main/java/com/netflix/conductor/core/events/queue/Message.java @@ -36,44 +36,32 @@ public Message(String id, String payload, String receipt, int priority) { this.priority = priority; } - /** - * @return the payload - */ + /** @return the payload */ public String getPayload() { return payload; } - /** - * @param payload the payload to set - */ + /** @param payload the payload to set */ public void setPayload(String payload) { this.payload = payload; } - /** - * @return the id - */ + /** @return the id */ public String getId() { return id; } - /** - * @param id the id to set - */ + /** @param id the id to set */ public void setId(String id) { this.id = id; } - /** - * @return Receipt attached to the message - */ + /** @return Receipt attached to the message */ public String getReceipt() { return receipt; } - /** - * @param receipt Receipt attached to the message - */ + /** @param receipt Receipt attached to the message */ public void setReceipt(String receipt) { this.receipt = receipt; } diff --git a/core/src/main/java/com/netflix/conductor/core/events/queue/ObservableQueue.java b/core/src/main/java/com/netflix/conductor/core/events/queue/ObservableQueue.java index 718cded762..897090ba7f 100644 --- a/core/src/main/java/com/netflix/conductor/core/events/queue/ObservableQueue.java +++ b/core/src/main/java/com/netflix/conductor/core/events/queue/ObservableQueue.java @@ -20,24 +20,16 @@ public interface ObservableQueue extends Lifecycle { - /** - * @return An observable for the given queue - */ + /** @return An observable for the given queue */ Observable observe(); - /** - * @return Type of the queue - */ + /** @return Type of the queue */ String getType(); - /** - * @return Name of the queue - */ + /** @return Name of the queue */ String getName(); - /** - * @return URI identifier for the queue. - */ + /** @return URI identifier for the queue. */ String getURI(); /** @@ -46,9 +38,7 @@ public interface ObservableQueue extends Lifecycle { */ List ack(List messages); - /** - * @param messages Messages to be published - */ + /** @param messages Messages to be published */ void publish(List messages); /** diff --git a/core/src/main/java/com/netflix/conductor/core/execution/AsyncSystemTaskExecutor.java b/core/src/main/java/com/netflix/conductor/core/execution/AsyncSystemTaskExecutor.java index 8f00b53564..20d21f1f3a 100644 --- a/core/src/main/java/com/netflix/conductor/core/execution/AsyncSystemTaskExecutor.java +++ b/core/src/main/java/com/netflix/conductor/core/execution/AsyncSystemTaskExecutor.java @@ -102,10 +102,9 @@ public void execute(WorkflowSystemTask systemTask, String taskId) { // if we are here the Task object is updated and needs to be persisted regardless of an // exception try { - WorkflowModel workflow = executionDAOFacade.getWorkflowModel( - workflowId, - systemTask.isTaskRetrievalRequired() - ); + WorkflowModel workflow = + executionDAOFacade.getWorkflowModel( + workflowId, systemTask.isTaskRetrievalRequired()); if (workflow.getStatus().isTerminal()) { LOGGER.info( diff --git a/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java b/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java index a321b6050a..5c21f39a9a 100644 --- a/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java +++ b/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java @@ -1468,9 +1468,7 @@ List dedupAndAddTasks(WorkflowModel workflow, List tasks) return dedupedTasks; } - /** - * @throws ConflictException if the workflow is in terminal state. - */ + /** @throws ConflictException if the workflow is in terminal state. */ public void pauseWorkflow(String workflowId) { try { executionLockService.acquireLock(workflowId, 60000); diff --git a/core/src/main/java/com/netflix/conductor/core/execution/tasks/SubWorkflow.java b/core/src/main/java/com/netflix/conductor/core/execution/tasks/SubWorkflow.java index 039e747098..d58b3c0050 100644 --- a/core/src/main/java/com/netflix/conductor/core/execution/tasks/SubWorkflow.java +++ b/core/src/main/java/com/netflix/conductor/core/execution/tasks/SubWorkflow.java @@ -219,6 +219,7 @@ private void updateTaskStatus(WorkflowModel subworkflow, TaskModel task) { /** * We don't need the tasks when retrieving the workflow data. + * * @return false */ @Override diff --git a/core/src/main/java/com/netflix/conductor/core/execution/tasks/WorkflowSystemTask.java b/core/src/main/java/com/netflix/conductor/core/execution/tasks/WorkflowSystemTask.java index 57030173cb..6f65f32590 100644 --- a/core/src/main/java/com/netflix/conductor/core/execution/tasks/WorkflowSystemTask.java +++ b/core/src/main/java/com/netflix/conductor/core/execution/tasks/WorkflowSystemTask.java @@ -65,9 +65,7 @@ public boolean execute( */ public void cancel(WorkflowModel workflow, TaskModel task, WorkflowExecutor workflowExecutor) {} - /** - * @return True if the task is supposed to be started asynchronously using internal queues. - */ + /** @return True if the task is supposed to be started asynchronously using internal queues. */ public boolean isAsync() { return false; } @@ -88,17 +86,16 @@ public boolean isAsyncComplete(TaskModel task) { } } - /** - * @return name of the system task - */ + /** @return name of the system task */ public String getTaskType() { return taskType; } /** - * Default to true for retrieving tasks when retrieving workflow data. - * Some cases (e.g. subworkflows) might not need the tasks at all, and by setting - * this to false in that case, you can get a solid performance gain. + * Default to true for retrieving tasks when retrieving workflow data. Some cases (e.g. + * subworkflows) might not need the tasks at all, and by setting this to false in that case, you + * can get a solid performance gain. + * * @return true for retrieving tasks when getting workflow */ public boolean isTaskRetrievalRequired() { diff --git a/core/src/main/java/com/netflix/conductor/dao/EventHandlerDAO.java b/core/src/main/java/com/netflix/conductor/dao/EventHandlerDAO.java index 6c9dc47a96..fa32024db8 100644 --- a/core/src/main/java/com/netflix/conductor/dao/EventHandlerDAO.java +++ b/core/src/main/java/com/netflix/conductor/dao/EventHandlerDAO.java @@ -26,19 +26,13 @@ public interface EventHandlerDAO { */ void addEventHandler(EventHandler eventHandler); - /** - * @param eventHandler Event handler to be updated. - */ + /** @param eventHandler Event handler to be updated. */ void updateEventHandler(EventHandler eventHandler); - /** - * @param name Removes the event handler from the system - */ + /** @param name Removes the event handler from the system */ void removeEventHandler(String name); - /** - * @return All the event handlers registered in the system - */ + /** @return All the event handlers registered in the system */ List getAllEventHandlers(); /** diff --git a/core/src/main/java/com/netflix/conductor/dao/ExecutionDAO.java b/core/src/main/java/com/netflix/conductor/dao/ExecutionDAO.java index 8e33cac29b..967551e6be 100644 --- a/core/src/main/java/com/netflix/conductor/dao/ExecutionDAO.java +++ b/core/src/main/java/com/netflix/conductor/dao/ExecutionDAO.java @@ -47,9 +47,7 @@ public interface ExecutionDAO { */ List createTasks(List tasks); - /** - * @param task Task to be updated - */ + /** @param task Task to be updated */ void updateTask(TaskModel task); /** @@ -204,13 +202,9 @@ List getWorkflowsByCorrelationId( */ boolean addEventExecution(EventExecution eventExecution); - /** - * @param eventExecution Event execution to be updated - */ + /** @param eventExecution Event execution to be updated */ void updateEventExecution(EventExecution eventExecution); - /** - * @param eventExecution Event execution to be removed - */ + /** @param eventExecution Event execution to be removed */ void removeEventExecution(EventExecution eventExecution); } diff --git a/core/src/main/java/com/netflix/conductor/dao/IndexDAO.java b/core/src/main/java/com/netflix/conductor/dao/IndexDAO.java index 490758d151..876f0d8dc2 100644 --- a/core/src/main/java/com/netflix/conductor/dao/IndexDAO.java +++ b/core/src/main/java/com/netflix/conductor/dao/IndexDAO.java @@ -43,9 +43,7 @@ public interface IndexDAO { */ CompletableFuture asyncIndexWorkflow(WorkflowSummary workflow); - /** - * @param task Task to be indexed - */ + /** @param task Task to be indexed */ void indexTask(TaskSummary task); /** @@ -120,9 +118,7 @@ CompletableFuture asyncUpdateWorkflow( */ String get(String workflowInstanceId, String key); - /** - * @param logs Task Execution logs to be indexed - */ + /** @param logs Task Execution logs to be indexed */ void addTaskExecutionLogs(List logs); /** @@ -137,9 +133,7 @@ CompletableFuture asyncUpdateWorkflow( */ List getTaskExecutionLogs(String taskId); - /** - * @param eventExecution Event Execution to be indexed - */ + /** @param eventExecution Event Execution to be indexed */ void addEventExecution(EventExecution eventExecution); List getEventExecutions(String event); diff --git a/core/src/main/java/com/netflix/conductor/dao/MetadataDAO.java b/core/src/main/java/com/netflix/conductor/dao/MetadataDAO.java index 2d9a79f3a9..fa19beb389 100644 --- a/core/src/main/java/com/netflix/conductor/dao/MetadataDAO.java +++ b/core/src/main/java/com/netflix/conductor/dao/MetadataDAO.java @@ -21,9 +21,7 @@ /** Data access layer for the workflow metadata - task definitions and workflow definitions */ public interface MetadataDAO { - /** - * @param taskDef task definition to be created - */ + /** @param taskDef task definition to be created */ TaskDef createTaskDef(TaskDef taskDef); /** @@ -38,24 +36,16 @@ public interface MetadataDAO { */ TaskDef getTaskDef(String name); - /** - * @return All the task definitions - */ + /** @return All the task definitions */ List getAllTaskDefs(); - /** - * @param name Name of the task - */ + /** @param name Name of the task */ void removeTaskDef(String name); - /** - * @param def workflow definition - */ + /** @param def workflow definition */ void createWorkflowDef(WorkflowDef def); - /** - * @param def workflow definition - */ + /** @param def workflow definition */ void updateWorkflowDef(WorkflowDef def); /** @@ -77,8 +67,6 @@ public interface MetadataDAO { */ void removeWorkflowDef(String name, Integer version); - /** - * @return List of all the workflow definitions - */ + /** @return List of all the workflow definitions */ List getAllWorkflowDefs(); } diff --git a/core/src/main/java/com/netflix/conductor/dao/QueueDAO.java b/core/src/main/java/com/netflix/conductor/dao/QueueDAO.java index 70b5857c5b..d14c7cfb43 100644 --- a/core/src/main/java/com/netflix/conductor/dao/QueueDAO.java +++ b/core/src/main/java/com/netflix/conductor/dao/QueueDAO.java @@ -110,19 +110,13 @@ public interface QueueDAO { */ boolean setUnackTimeout(String queueName, String messageId, long unackTimeout); - /** - * @param queueName Name of the queue - */ + /** @param queueName Name of the queue */ void flush(String queueName); - /** - * @return key : queue name, value: size of the queue - */ + /** @return key : queue name, value: size of the queue */ Map queuesDetail(); - /** - * @return key : queue name, value: map of shard name to size and unack queue size - */ + /** @return key : queue name, value: map of shard name to size and unack queue size */ Map>> queuesDetailVerbose(); default void processUnacks(String queueName) {} diff --git a/core/src/main/java/com/netflix/conductor/model/TaskModel.java b/core/src/main/java/com/netflix/conductor/model/TaskModel.java index 4e5814db35..7e967195c5 100644 --- a/core/src/main/java/com/netflix/conductor/model/TaskModel.java +++ b/core/src/main/java/com/netflix/conductor/model/TaskModel.java @@ -190,18 +190,14 @@ public void setInputData(Map inputData) { this.inputData = inputData; } - /** - * @deprecated Used only for JSON serialization and deserialization. - */ + /** @deprecated Used only for JSON serialization and deserialization. */ @JsonProperty("inputData") @Deprecated public void setRawInputData(Map inputData) { setInputData(inputData); } - /** - * @deprecated Used only for JSON serialization and deserialization. - */ + /** @deprecated Used only for JSON serialization and deserialization. */ @JsonProperty("inputData") @Deprecated public Map getRawInputData() { @@ -400,18 +396,14 @@ public void setOutputData(Map outputData) { this.outputData = outputData; } - /** - * @deprecated Used only for JSON serialization and deserialization. - */ + /** @deprecated Used only for JSON serialization and deserialization. */ @JsonProperty("outputData") @Deprecated public void setRawOutputData(Map inputData) { setOutputData(inputData); } - /** - * @deprecated Used only for JSON serialization and deserialization. - */ + /** @deprecated Used only for JSON serialization and deserialization. */ @JsonProperty("outputData") @Deprecated public Map getRawOutputData() { @@ -547,9 +539,7 @@ public void incrementPollCount() { ++this.pollCount; } - /** - * @return {@link Optional} containing the task definition if available - */ + /** @return {@link Optional} containing the task definition if available */ public Optional getTaskDefinition() { return Optional.ofNullable(this.getWorkflowTask()).map(WorkflowTask::getTaskDefinition); } @@ -566,9 +556,7 @@ public void setWaitTimeout(long waitTimeout) { this.waitTimeout = waitTimeout; } - /** - * @return the queueWaitTime - */ + /** @return the queueWaitTime */ public long getQueueWaitTime() { if (this.startTime > 0 && this.scheduledTime > 0) { if (this.updateTime > 0 && getCallbackAfterSeconds() > 0) { @@ -583,9 +571,7 @@ public long getQueueWaitTime() { return 0L; } - /** - * @return a copy of the task instance - */ + /** @return a copy of the task instance */ public TaskModel copy() { TaskModel copy = new TaskModel(); BeanUtils.copyProperties(this, copy); diff --git a/core/src/main/java/com/netflix/conductor/model/WorkflowModel.java b/core/src/main/java/com/netflix/conductor/model/WorkflowModel.java index 14f977407c..0f9d6c3b9c 100644 --- a/core/src/main/java/com/netflix/conductor/model/WorkflowModel.java +++ b/core/src/main/java/com/netflix/conductor/model/WorkflowModel.java @@ -199,36 +199,28 @@ public void setOutput(Map output) { this.output = output; } - /** - * @deprecated Used only for JSON serialization and deserialization. - */ + /** @deprecated Used only for JSON serialization and deserialization. */ @Deprecated @JsonProperty("input") public Map getRawInput() { return input; } - /** - * @deprecated Used only for JSON serialization and deserialization. - */ + /** @deprecated Used only for JSON serialization and deserialization. */ @Deprecated @JsonProperty("input") public void setRawInput(Map input) { setInput(input); } - /** - * @deprecated Used only for JSON serialization and deserialization. - */ + /** @deprecated Used only for JSON serialization and deserialization. */ @Deprecated @JsonProperty("output") public Map getRawOutput() { return output; } - /** - * @deprecated Used only for JSON serialization and deserialization. - */ + /** @deprecated Used only for JSON serialization and deserialization. */ @Deprecated @JsonProperty("output") public void setRawOutput(Map output) { diff --git a/core/src/main/java/com/netflix/conductor/service/MetadataService.java b/core/src/main/java/com/netflix/conductor/service/MetadataService.java index 9acadbb4b7..17af98e0cd 100644 --- a/core/src/main/java/com/netflix/conductor/service/MetadataService.java +++ b/core/src/main/java/com/netflix/conductor/service/MetadataService.java @@ -31,27 +31,19 @@ @Validated public interface MetadataService { - /** - * @param taskDefinitions Task Definitions to register - */ + /** @param taskDefinitions Task Definitions to register */ void registerTaskDef( @NotNull(message = "TaskDefList cannot be empty or null") @Size(min = 1, message = "TaskDefList is empty") List<@Valid TaskDef> taskDefinitions); - /** - * @param taskDefinition Task Definition to be updated - */ + /** @param taskDefinition Task Definition to be updated */ void updateTaskDef(@NotNull(message = "TaskDef cannot be null") @Valid TaskDef taskDefinition); - /** - * @param taskType Remove task definition - */ + /** @param taskType Remove task definition */ void unregisterTaskDef(@NotEmpty(message = "TaskName cannot be null or empty") String taskType); - /** - * @return List of all the registered tasks - */ + /** @return List of all the registered tasks */ List getTaskDefs(); /** @@ -60,14 +52,10 @@ void registerTaskDef( */ TaskDef getTaskDef(@NotEmpty(message = "TaskType cannot be null or empty") String taskType); - /** - * @param def Workflow definition to be updated - */ + /** @param def Workflow definition to be updated */ void updateWorkflowDef(@NotNull(message = "WorkflowDef cannot be null") @Valid WorkflowDef def); - /** - * @param workflowDefList Workflow definitions to be updated. - */ + /** @param workflowDefList Workflow definitions to be updated. */ void updateWorkflowDef( @NotNull(message = "WorkflowDef list name cannot be null or empty") @Size(min = 1, message = "WorkflowDefList is empty") @@ -90,14 +78,10 @@ WorkflowDef getWorkflowDef( Optional getLatestWorkflow( @NotEmpty(message = "Workflow name cannot be null or empty") String name); - /** - * @return Returns all workflow defs (all versions) - */ + /** @return Returns all workflow defs (all versions) */ List getWorkflowDefs(); - /** - * @return Returns workflow names and versions only (no definition bodies) - */ + /** @return Returns workflow names and versions only (no definition bodies) */ Map> getWorkflowNamesAndVersions(); void registerWorkflowDef( @@ -128,21 +112,15 @@ void unregisterWorkflowDef( void addEventHandler( @NotNull(message = "EventHandler cannot be null") @Valid EventHandler eventHandler); - /** - * @param eventHandler Event handler to be updated. - */ + /** @param eventHandler Event handler to be updated. */ void updateEventHandler( @NotNull(message = "EventHandler cannot be null") @Valid EventHandler eventHandler); - /** - * @param name Removes the event handler from the system - */ + /** @param name Removes the event handler from the system */ void removeEventHandlerStatus( @NotEmpty(message = "EventName cannot be null or empty") String name); - /** - * @return All the event handlers registered in the system - */ + /** @return All the event handlers registered in the system */ List getAllEventHandlers(); /** diff --git a/core/src/main/java/com/netflix/conductor/service/MetadataServiceImpl.java b/core/src/main/java/com/netflix/conductor/service/MetadataServiceImpl.java index 84f6fcf822..d7e9d2c1a1 100644 --- a/core/src/main/java/com/netflix/conductor/service/MetadataServiceImpl.java +++ b/core/src/main/java/com/netflix/conductor/service/MetadataServiceImpl.java @@ -50,9 +50,7 @@ public MetadataServiceImpl( properties.isOwnerEmailMandatory()); } - /** - * @param taskDefinitions Task Definitions to register - */ + /** @param taskDefinitions Task Definitions to register */ public void registerTaskDef(List taskDefinitions) { for (TaskDef taskDefinition : taskDefinitions) { taskDefinition.setCreatedBy(WorkflowContext.get().getClientApp()); @@ -69,9 +67,7 @@ public void validateWorkflowDef(WorkflowDef workflowDef) { // do nothing, WorkflowDef is annotated with @Valid and calling this method will validate it } - /** - * @param taskDefinition Task Definition to be updated - */ + /** @param taskDefinition Task Definition to be updated */ public void updateTaskDef(TaskDef taskDefinition) { TaskDef existing = metadataDAO.getTaskDef(taskDefinition.getName()); if (existing == null) { @@ -82,16 +78,12 @@ public void updateTaskDef(TaskDef taskDefinition) { metadataDAO.updateTaskDef(taskDefinition); } - /** - * @param taskType Remove task definition - */ + /** @param taskType Remove task definition */ public void unregisterTaskDef(String taskType) { metadataDAO.removeTaskDef(taskType); } - /** - * @return List of all the registered tasks - */ + /** @return List of all the registered tasks */ public List getTaskDefs() { return metadataDAO.getAllTaskDefs(); } @@ -108,17 +100,13 @@ public TaskDef getTaskDef(String taskType) { return taskDef; } - /** - * @param workflowDef Workflow definition to be updated - */ + /** @param workflowDef Workflow definition to be updated */ public void updateWorkflowDef(WorkflowDef workflowDef) { workflowDef.setUpdateTime(System.currentTimeMillis()); metadataDAO.updateWorkflowDef(workflowDef); } - /** - * @param workflowDefList Workflow definitions to be updated. - */ + /** @param workflowDefList Workflow definitions to be updated. */ public void updateWorkflowDef(List workflowDefList) { for (WorkflowDef workflowDef : workflowDefList) { workflowDef.setUpdateTime(System.currentTimeMillis()); @@ -178,23 +166,17 @@ public void addEventHandler(EventHandler eventHandler) { eventHandlerDAO.addEventHandler(eventHandler); } - /** - * @param eventHandler Event handler to be updated. - */ + /** @param eventHandler Event handler to be updated. */ public void updateEventHandler(EventHandler eventHandler) { eventHandlerDAO.updateEventHandler(eventHandler); } - /** - * @param name Removes the event handler from the system - */ + /** @param name Removes the event handler from the system */ public void removeEventHandlerStatus(String name) { eventHandlerDAO.removeEventHandler(name); } - /** - * @return All the event handlers registered in the system - */ + /** @return All the event handlers registered in the system */ public List getAllEventHandlers() { return eventHandlerDAO.getAllEventHandlers(); } diff --git a/core/src/test/java/com/netflix/conductor/core/execution/tasks/TestLambda.java b/core/src/test/java/com/netflix/conductor/core/execution/tasks/TestLambda.java index b6a857fbe2..b62a355ca4 100644 --- a/core/src/test/java/com/netflix/conductor/core/execution/tasks/TestLambda.java +++ b/core/src/test/java/com/netflix/conductor/core/execution/tasks/TestLambda.java @@ -24,9 +24,7 @@ import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.mock; -/** - * @author x-ultra - */ +/** @author x-ultra */ public class TestLambda { private final WorkflowModel workflow = new WorkflowModel();