diff --git a/plugins/org.eclipse.dd.examples.dsf/src_preprocess/org/eclipse/dd/examples/dsf/dataviewer/DataGeneratorWithExecutor.java b/plugins/org.eclipse.dd.examples.dsf/src_preprocess/org/eclipse/dd/examples/dsf/dataviewer/DataGeneratorWithExecutor.java index d667b2810d4..d3c392c8e2c 100644 --- a/plugins/org.eclipse.dd.examples.dsf/src_preprocess/org/eclipse/dd/examples/dsf/dataviewer/DataGeneratorWithExecutor.java +++ b/plugins/org.eclipse.dd.examples.dsf/src_preprocess/org/eclipse/dd/examples/dsf/dataviewer/DataGeneratorWithExecutor.java @@ -50,7 +50,8 @@ import org.eclipse.dd.examples.dsf.DsfExamplesPlugin; *
*/ //#ifdef excercises -// TODO Excercise 4 - Add an annotationindicating allowed concurrency access +//TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) +//indicating allowed thread access to this class/method/member //#else //#@ThreadSafe //#endif @@ -73,7 +74,8 @@ public class DataGeneratorWithExecutor implements IDataGenerator { } //#ifdef excercises - // TODO Excercise 4 - Add an annotationindicating allowed concurrency access + // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) + // indicating allowed thread access to this class/method/member //#else //# @Immutable //#endif @@ -84,7 +86,8 @@ public class DataGeneratorWithExecutor implements IDataGenerator { } //#ifdef excercises - // TODO Excercise 4 - Add an annotationindicating allowed concurrency access + // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) + // indicating allowed thread access to this class/method/member //#else //# @Immutable //#endif @@ -98,7 +101,8 @@ public class DataGeneratorWithExecutor implements IDataGenerator { // The executor used to access all internal data of the generator. //#ifdef excercises - // TODO Excercise 4 - Add an annotation indicating allowed concurrency access + // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) + // indicating allowed thread access to this class/method/member // Hint: If a member does not have an annotation, the programmer can assume // that the concurrency rule that applies to the class also applies to this // member. @@ -110,7 +114,8 @@ public class DataGeneratorWithExecutor implements IDataGenerator { // method reads from it. // The executor used to access all internal data of the generator. //#ifdef excercises - // TODO Excercise 4 - Add an annotationindicating allowed concurrency access + // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) + // indicating allowed thread access to this class/method/member //#else //# @ConfinedToDsfExecutor("fExecutor") //#endif @@ -119,7 +124,8 @@ public class DataGeneratorWithExecutor implements IDataGenerator { // List of listeners is not synchronized, it also has to be accessed // using the executor. //#ifdef excercises - // TODO Excercise 4 - Add an annotationindicating allowed concurrency access + // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) + // indicating allowed thread access to this class/method/member //#else //# @ConfinedToDsfExecutor("fExecutor") //#endif @@ -127,7 +133,8 @@ public class DataGeneratorWithExecutor implements IDataGenerator { // Current number of elements in this generator. //#ifdef excercises - // TODO Excercise 4 - Add an annotationindicating allowed concurrency access + // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) + // indicating allowed thread access to this class/method/member //#else //# @ConfinedToDsfExecutor("fExecutor") //#endif @@ -135,7 +142,8 @@ public class DataGeneratorWithExecutor implements IDataGenerator { // Counter used to determine when to reset the element count. //#ifdef excercises - // TODO Excercise 4 - Add an annotationindicating allowed concurrency access + // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) + // indicating allowed thread access to this class/method/member //#else //# @ConfinedToDsfExecutor("fExecutor") //#endif @@ -143,7 +151,8 @@ public class DataGeneratorWithExecutor implements IDataGenerator { // Elements which were modified since the last reset. //#ifdef excercises - // TODO Excercise 4 - Add an annotationindicating allowed concurrency access + // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) + // indicating allowed thread access to this class/method/member //#else //# @ConfinedToDsfExecutor("fExecutor") //#endif @@ -151,14 +160,16 @@ public class DataGeneratorWithExecutor implements IDataGenerator { // Flag used to ensure that requests are processed sequentially. //#ifdef excercises - // TODO Excercise 4 - Add an annotationindicating allowed concurrency access + // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) + // indicating allowed thread access to this class/method/member //#else //# @ConfinedToDsfExecutor("fExecutor") //#endif private boolean fServiceQueueInProgress = false; //#ifdef excercises - // TODO Excercise 4 - Add an annotation indicating allowed concurrency access + // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) + // indicating allowed thread access to this class/method/member //#endif public DataGeneratorWithExecutor() { // Create the executor @@ -177,7 +188,8 @@ public class DataGeneratorWithExecutor implements IDataGenerator { } //#ifdef excercises - // TODO Excercise 4 - Add an annotation indicating allowed concurrency access + // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) + // indicating allowed thread access to this class/method/member //#endif public void shutdown(final RequestMonitor rm) { try { @@ -203,7 +215,8 @@ public class DataGeneratorWithExecutor implements IDataGenerator { } //#ifdef excercises - // TODO Excercise 4 - Add an annotation indicating allowed concurrency access + // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) + // indicating allowed thread access to this class/method/member //#endif public void getCount(final DataRequestMonitor