First pass on separating stm into its own module
- removed transactors everywhere - moved stm into akka-stm module - disabled agents (they use transactors internally) - rewrote persistence tests so that they don't use transactors
This commit is contained in:
parent
73c0f31779
commit
9012847ff1
84 changed files with 404 additions and 1495 deletions
|
|
@ -1,36 +0,0 @@
|
|||
package akka.stm;
|
||||
|
||||
import akka.stm.Ref;
|
||||
import akka.stm.local.Atomic;
|
||||
|
||||
public class RefExample {
|
||||
public static void main(String[] args) {
|
||||
System.out.println();
|
||||
System.out.println("Ref example");
|
||||
System.out.println();
|
||||
|
||||
final Ref<Integer> ref = new Ref<Integer>(0);
|
||||
|
||||
Integer value1 = new Atomic<Integer>() {
|
||||
public Integer atomically() {
|
||||
return ref.get();
|
||||
}
|
||||
}.execute();
|
||||
|
||||
System.out.println("value 1: " + value1);
|
||||
|
||||
new Atomic() {
|
||||
public Object atomically() {
|
||||
return ref.set(5);
|
||||
}
|
||||
}.execute();
|
||||
|
||||
Integer value2 = new Atomic<Integer>() {
|
||||
public Integer atomically() {
|
||||
return ref.get();
|
||||
}
|
||||
}.execute();
|
||||
|
||||
System.out.println("value 2: " + value2);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue