diff options
Diffstat (limited to 'sources/core')
| -rw-r--r-- | sources/core/VSAbstractProcess.java | 12 | ||||
| -rw-r--r-- | sources/core/VSInternalProcess.java | 18 | ||||
| -rw-r--r-- | sources/core/VSMessage.java | 2 | ||||
| -rw-r--r-- | sources/core/VSMessageStub.java | 6 | ||||
| -rw-r--r-- | sources/core/VSTask.java | 7 |
5 files changed, 25 insertions, 20 deletions
diff --git a/sources/core/VSAbstractProcess.java b/sources/core/VSAbstractProcess.java index 4c500ea..638ad53 100644 --- a/sources/core/VSAbstractProcess.java +++ b/sources/core/VSAbstractProcess.java @@ -92,8 +92,8 @@ public abstract class VSAbstractProcess extends VSPrefs /** The tasks of the process. DO ONLY MANIPULATE THIS OBJECT WITHIN THE * VSTaskManager CLASS! OTHERWISE THE SYNCHRONIZATION IS WRONG! Use the - * VSAbstractProcess.getTasks() method to get a reference to this object within the - * VSTaskManager! */ + * VSAbstractProcess.getTasks() method to get a reference to this object + * within the VSTaskManager! */ protected VSPriorityQueue<VSTask> tasks; /** The process has crashed. But may be working again. */ @@ -200,7 +200,8 @@ public abstract class VSAbstractProcess extends VSPrefs * @param logging the logging object */ public VSAbstractProcess(VSPrefs prefs, int processNum, - VSSimulatorCanvas simulatorCanvas, VSLogging logging) { + VSSimulatorCanvas simulatorCanvas, + VSLogging logging) { init(prefs, processNum, simulatorCanvas, logging); } @@ -666,7 +667,8 @@ public abstract class VSAbstractProcess extends VSPrefs super.serialize(serialize, objectOutputStream); if (VSSerialize.DEBUG) - System.out.println("Serializing: VSAbstractProcess (num: " + processNum + System.out.println("Serializing: VSAbstractProcess (num: " + + processNum + "; id: " + processID + ")"); /** For later backwards compatibility, to add more stuff */ @@ -746,5 +748,5 @@ public abstract class VSAbstractProcess extends VSPrefs * @see core.VSInternalMessage#getProtocolObjekt(java.util.String) */ protected abstract VSAbstractProtocol getProtocolObject_( - String protocolClassname); + String protocolClassname); } diff --git a/sources/core/VSInternalProcess.java b/sources/core/VSInternalProcess.java index df70cc8..9311d0a 100644 --- a/sources/core/VSInternalProcess.java +++ b/sources/core/VSInternalProcess.java @@ -37,8 +37,8 @@ import simulator.*; import utils.*; /** - * The class VSInternalProcess, an object of this class represents a process of a - * simulator. + * The class VSInternalProcess, an object of this class represents a process + * of a simulator. * * @author Paul C. Buetow */ @@ -52,7 +52,8 @@ public class VSInternalProcess extends VSAbstractProcess { * @param logging the logging object */ public VSInternalProcess(VSPrefs prefs, int processNum, - VSSimulatorCanvas simulatorCanvas, VSLogging logging) { + VSSimulatorCanvas simulatorCanvas, + VSLogging logging) { super(prefs, processNum, simulatorCanvas, logging); } @@ -143,9 +144,10 @@ public class VSInternalProcess extends VSAbstractProcess { /** * Creates the random crash task. The crash task will be created only if - * the process is not crashed atm. and if VSInternalProcess.getARandomCrashTime() - * returns a non-negative value. The random crash task uses the simulaion's - * global time for its scheduling. + * the process is not crashed atm. and if + * VSInternalProcess.getARandomCrashTime() * returns a non-negative value. + * The random crash task uses the simulaion's global time for its + * scheduling. */ public synchronized void createRandomCrashTask() { if (!isCrashed) { @@ -291,7 +293,7 @@ public class VSInternalProcess extends VSAbstractProcess { * will not get lost at all. */ public synchronized long getARandomMessageOutageTime(long durationTime, - VSInternalProcess receiverProcess) { + VSInternalProcess receiverProcess) { int percentage = (int) ((getInteger("message.prob.outage") + receiverProcess.getInteger( "message.prob.outage")) / 2); @@ -404,7 +406,7 @@ public class VSInternalProcess extends VSAbstractProcess { * @return the protocol object */ public synchronized VSAbstractProtocol getProtocolObject( - String protocolClassname) { + String protocolClassname) { VSAbstractProtocol protocol = null; if (!objectExists(protocolClassname)) { diff --git a/sources/core/VSMessage.java b/sources/core/VSMessage.java index 388f3d0..c896828 100644 --- a/sources/core/VSMessage.java +++ b/sources/core/VSMessage.java @@ -94,7 +94,7 @@ public class VSMessage extends VSPrefs { * @param isServerMessage Sets if the message has been sent by a server. */ void init(VSInternalProcess process, String protocolClassname, - boolean isServerMessage) { + boolean isServerMessage) { this.sendingProcess = process; this.protocolClassname = protocolClassname; this.isServerMessage = isServerMessage; diff --git a/sources/core/VSMessageStub.java b/sources/core/VSMessageStub.java index eaa8929..b320fa0 100644 --- a/sources/core/VSMessageStub.java +++ b/sources/core/VSMessageStub.java @@ -43,8 +43,8 @@ public class VSMessageStub { /** * The constructor of the message stub. Creates a new message stub object. - * - * @param message the message + * + * @param message the message */ public VSMessageStub(VSMessage message) { this.message = message; @@ -55,7 +55,7 @@ public class VSMessageStub { */ public void init(VSInternalProcess process, String protocolClassname, boolean isServerMessage) { - message.init(process, protocolClassname, isServerMessage); + message.init(process, protocolClassname, isServerMessage); } } diff --git a/sources/core/VSTask.java b/sources/core/VSTask.java index 285e52c..3a16593 100644 --- a/sources/core/VSTask.java +++ b/sources/core/VSTask.java @@ -91,7 +91,8 @@ public class VSTask implements Comparable, VSSerializable { * @param event the event * @param isLocal the taks is local timed */ - public VSTask(long taskTime, VSInternalProcess process, VSAbstractEvent event, + public VSTask(long taskTime, VSInternalProcess process, + VSAbstractEvent event, boolean isLocal) { init(taskTime, process, event, isLocal); } @@ -137,8 +138,8 @@ public class VSTask implements Comparable, VSSerializable { * @param event the event * @param isLocal the taks is local timed */ - private void init(long taskTime, VSInternalProcess process, VSAbstractEvent event, - boolean isLocal) { + private void init(long taskTime, VSInternalProcess process, + VSAbstractEvent event, boolean isLocal) { this.process = process; this.taskTime = taskTime > 0 ? taskTime : 0; /* May be not null if called from deserialization */ |
