com.surelogic
Annotation Type SingleThreaded


Deprecated.

@Documented
@Deprecated
@Target(value=CONSTRUCTOR)
public @interface SingleThreaded

This annotation is no longer required to declare that the constructor to which this annotation is applied remains confined to the thread that invoked the constructor.

Therefore, it is recommended that you remove any SingleThreaded annotations from your code. For example, you would change

 @RegionLock("Lock is this protects Instance")
 public class Example {
 
   int x = 1;
   int y;
 
   @SingleThreaded
   @Borrowed("this")
   public Example(int y) {
     this.y = y;
   }
   ...
 }
 
to
 @RegionLock("Lock is this protects Instance")
 public class Example {
 
   int x = 1;
   int y;
 
   @Borrowed("this")
   public Example(int y) {
     this.y = y;
   }
   ...
 }
 
or, alternatively, you can use @Unique("return") instead of @Borrowed("this").
 @RegionLock("Lock is this protects Instance")
 public class Example {
 
   int x = 1;
   int y;
 
   @Unique("return")
   public Example(int y) {
     this.y = y;
   }
   ...
 }
 

See Also:
RegionLock



Copyright © 2010 Surelogic, Inc.. All Rights Reserved.