Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Running spotless apply on conductor core
Browse files Browse the repository at this point in the history
  • Loading branch information
james-deee committed Aug 6, 2022
1 parent 1e5ffd6 commit b5ebd43
Show file tree
Hide file tree
Showing 19 changed files with 76 additions and 210 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Object> getAll() {
Map<String, Object> map = new HashMap<>();
Properties props = System.getProperties();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,7 @@ public List<Workflow> 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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,16 @@

public interface ObservableQueue extends Lifecycle {

/**
* @return An observable for the given queue
*/
/** @return An observable for the given queue */
Observable<Message> 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();

/**
Expand All @@ -46,9 +38,7 @@ public interface ObservableQueue extends Lifecycle {
*/
List<String> ack(List<Message> messages);

/**
* @param messages Messages to be published
*/
/** @param messages Messages to be published */
void publish(List<Message> messages);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1468,9 +1468,7 @@ List<TaskModel> dedupAndAddTasks(WorkflowModel workflow, List<TaskModel> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<EventHandler> getAllEventHandlers();

/**
Expand Down
12 changes: 3 additions & 9 deletions core/src/main/java/com/netflix/conductor/dao/ExecutionDAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ public interface ExecutionDAO {
*/
List<TaskModel> createTasks(List<TaskModel> tasks);

/**
* @param task Task to be updated
*/
/** @param task Task to be updated */
void updateTask(TaskModel task);

/**
Expand Down Expand Up @@ -204,13 +202,9 @@ List<WorkflowModel> 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);
}
12 changes: 3 additions & 9 deletions core/src/main/java/com/netflix/conductor/dao/IndexDAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ public interface IndexDAO {
*/
CompletableFuture<Void> asyncIndexWorkflow(WorkflowSummary workflow);

/**
* @param task Task to be indexed
*/
/** @param task Task to be indexed */
void indexTask(TaskSummary task);

/**
Expand Down Expand Up @@ -120,9 +118,7 @@ CompletableFuture<Void> 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<TaskExecLog> logs);

/**
Expand All @@ -137,9 +133,7 @@ CompletableFuture<Void> asyncUpdateWorkflow(
*/
List<TaskExecLog> getTaskExecutionLogs(String taskId);

/**
* @param eventExecution Event Execution to be indexed
*/
/** @param eventExecution Event Execution to be indexed */
void addEventExecution(EventExecution eventExecution);

List<EventExecution> getEventExecutions(String event);
Expand Down
24 changes: 6 additions & 18 deletions core/src/main/java/com/netflix/conductor/dao/MetadataDAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/**
Expand All @@ -38,24 +36,16 @@ public interface MetadataDAO {
*/
TaskDef getTaskDef(String name);

/**
* @return All the task definitions
*/
/** @return All the task definitions */
List<TaskDef> 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);

/**
Expand All @@ -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<WorkflowDef> getAllWorkflowDefs();
}
12 changes: 3 additions & 9 deletions core/src/main/java/com/netflix/conductor/dao/QueueDAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Long> 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<String, Map<String, Map<String, Long>>> queuesDetailVerbose();

default void processUnacks(String queueName) {}
Expand Down
Loading

0 comments on commit b5ebd43

Please sign in to comment.