diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-20 19:25:10 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-20 19:25:10 +0300 |
| commit | 7ee77637273e2e913cf19f078e9143ae6977f44f (patch) | |
| tree | 2cda0f82a7bf4c6f76e115f57e28de18d744d5e6 /src/main/java/core/VSTask.java | |
| parent | 70fc0505b223f7bf17d3671d0532773359cf7858 (diff) | |
Add comprehensive Javadoc documentation for public APIs
- Document core classes: VSTask, VSMessage, VSInternalProcess
- Document event interfaces: VSAbstractEvent, VSCopyableEvent, VSTime
- Document timestamp events: VSTimestampTriggeredEvent, VSLamportTimestampEvent
- Document protocol framework: VSAbstractProtocol methods
- Document VSSimulator and VSRegisteredEvents
- Add detailed method descriptions with parameter and return value docs
- Include usage examples and cross-references between related classes
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'src/main/java/core/VSTask.java')
| -rw-r--r-- | src/main/java/core/VSTask.java | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/main/java/core/VSTask.java b/src/main/java/core/VSTask.java index cc43f1c..81b098e 100644 --- a/src/main/java/core/VSTask.java +++ b/src/main/java/core/VSTask.java @@ -257,7 +257,12 @@ public class VSTask implements Comparable<Object>, VSSerializable { } /** - * Runs the task. + * Executes this task by running its associated event. + * This method is called by the task manager when the task's scheduled time arrives. + * If the event requires it, this will also increase the process's timestamps. + * + * @see VSAbstractEvent#onStart() + * @see VSAbstractEvent#shouldIncreaseTimestamps() */ public void run() { if (event.getProcess() == null) @@ -279,18 +284,22 @@ public class VSTask implements Comparable<Object>, VSSerializable { } /** - * Sets the task time. + * Sets the scheduled execution time for this task. + * For global-timed tasks, this is in global simulation time units. + * For local-timed tasks, this is in the process's local time units. * - * @param taskTime the task time + * @param taskTime the time when this task should execute */ public void setTaskTime(long taskTime) { this.taskTime = taskTime; } /** - * Sets the process. + * Sets the process that owns this task. + * This method only updates the process if it differs from the current one. + * It also updates the event's process reference. * - * @param process the process + * @param process the process that will own and execute this task */ public void setProcess(VSInternalProcess process) { /* Only do it if the process differs */ |
