|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Retention(value=RUNTIME) @Target(value=FIELD) public @interface FieldGranularity
Annotation that can be placed above a field to indicate that the stm should use a field level granularity instead of object level granularity. If you have a transactional object with 2 mutable fields, 2 transactions could conflict even if they are writing to a different one. This reduce this 'unneeded' failure, this annotation can be placed on fields.
Under water these fields are transformed to transactional references or transactional primitives.
&at;TransactionalObject
class Person{
&at;FieldGranularity
private String name;
&at;FieldGranularity
private int age;
}
This is transformed to:
&at;TransactionalObject
class Person{
private final TransactionalReference<String> name = new ...
private final TransactionalInteger age = new ...
}
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||