summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cli/runtime/TObj.cs14
-rw-r--r--src/cli/runtime/Transaction.cs28
-rw-r--r--src/jvm/clojure/lang/TObj.java14
-rw-r--r--src/jvm/clojure/lang/Transaction.java28
4 files changed, 42 insertions, 42 deletions
diff --git a/src/cli/runtime/TObj.cs b/src/cli/runtime/TObj.cs
index dcee3060..37c38b83 100644
--- a/src/cli/runtime/TObj.cs
+++ b/src/cli/runtime/TObj.cs
@@ -22,30 +22,30 @@ public TObj(){
public Object put( Object key, Object val) {
- IPersistentMap t = (IPersistentMap) Transaction.get2( _attrs);
+ IPersistentMap t = (IPersistentMap) Transaction.get( _attrs);
t = t.put(key, val);
- Transaction.set2(_attrs,t);
+ Transaction.set(_attrs,t);
return val;
}
public Object get( Object key) {
- IPersistentMap t = (IPersistentMap) Transaction.get2( _attrs);
+ IPersistentMap t = (IPersistentMap) Transaction.get( _attrs);
return t.get(key);
}
public bool has( Object key) {
- IPersistentMap t = (IPersistentMap) Transaction.get2( _attrs);
+ IPersistentMap t = (IPersistentMap) Transaction.get( _attrs);
return t.contains(key);
}
public IPersistentMap attrs() {
- return (IPersistentMap) Transaction.get2(_attrs);
+ return (IPersistentMap) Transaction.get(_attrs);
}
public void remove(Object key) {
- IPersistentMap t = (IPersistentMap) Transaction.get2( _attrs);
+ IPersistentMap t = (IPersistentMap) Transaction.get( _attrs);
t = t.remove(key);
- Transaction.set2(_attrs,t);
+ Transaction.set(_attrs,t);
}
}
}
diff --git a/src/cli/runtime/Transaction.cs b/src/cli/runtime/Transaction.cs
index aaaac9dc..a38fc13f 100644
--- a/src/cli/runtime/Transaction.cs
+++ b/src/cli/runtime/Transaction.cs
@@ -66,27 +66,27 @@ static public Object runInTransaction(ThreadLocalData tld,IFn fn) {
static public TRef tref(Object val) {
Transaction trans = ThreadLocalData.getTransaction();
TRef tref = new TRef();
- trans.set(tref, val);
+ trans.doSet(tref, val);
return tref;
}
-static public Object get2(TRef tref) {
+static public Object get(TRef tref) {
Transaction trans = ThreadLocalData.getTransaction();
if(trans != null)
- return trans.get(tref);
+ return trans.doGet(tref);
return getCurrent(tref).val;
}
-static public Object set2(TRef tref, Object val) {
- return ThreadLocalData.getTransaction().set(tref,val);
+static public Object set(TRef tref, Object val) {
+ return ThreadLocalData.getTransaction().doSet(tref,val);
}
-static public void touch2(TRef tref) {
- ThreadLocalData.getTransaction().touch(tref);
+static public void touch(TRef tref) {
+ ThreadLocalData.getTransaction().doTouch(tref);
}
-static public void commutate2(TRef tref, IFn fn) {
- ThreadLocalData.getTransaction().commutate(tref, fn);
+static public void commutate(TRef tref, IFn fn) {
+ ThreadLocalData.getTransaction().doCommutate(tref, fn);
}
@@ -193,7 +193,7 @@ Transaction(){
}
}
-Object get(TRef tref) {
+Object doGet(TRef tref) {
if(sets != null && sets.ContainsKey(tref))
return sets[tref];
@@ -217,7 +217,7 @@ static TVal getCurrent(TRef tref) {
return null;
}
-Object set(TRef tref, Object val) {
+Object doSet(TRef tref, Object val) {
if(sets == null)
sets = new Dictionary<TRef,Object>();
if(commutates != null && commutates.ContainsKey(tref))
@@ -227,11 +227,11 @@ Object set(TRef tref, Object val) {
return val;
}
-void touch(TRef tref) {
- set(tref, get(tref));
+void doTouch(TRef tref) {
+ doSet(tref, doGet(tref));
}
-void commutate(TRef tref, IFn fn) {
+void doCommutate(TRef tref, IFn fn) {
if(commutates == null)
commutates = new Dictionary<TRef,ISeq>();
if(sets != null && sets.ContainsKey(tref))
diff --git a/src/jvm/clojure/lang/TObj.java b/src/jvm/clojure/lang/TObj.java
index 05dead2e..ed3fd935 100644
--- a/src/jvm/clojure/lang/TObj.java
+++ b/src/jvm/clojure/lang/TObj.java
@@ -19,29 +19,29 @@ public TObj() throws Exception{
public Object put( Object key, Object val) throws Exception {
- IPersistentMap t = (IPersistentMap) Transaction.get2( _attrs);
+ IPersistentMap t = (IPersistentMap) Transaction.get( _attrs);
t = t.put(key, val);
- Transaction.set2(_attrs,t);
+ Transaction.set(_attrs,t);
return val;
}
public Object get( Object key) throws Exception {
- IPersistentMap t = (IPersistentMap) Transaction.get2( _attrs);
+ IPersistentMap t = (IPersistentMap) Transaction.get( _attrs);
return t.get(key);
}
public boolean has( Object key) throws Exception {
- IPersistentMap t = (IPersistentMap) Transaction.get2( _attrs);
+ IPersistentMap t = (IPersistentMap) Transaction.get( _attrs);
return t.contains(key);
}
public IPersistentMap attrs() throws Exception {
- return (IPersistentMap) Transaction.get2(_attrs);
+ return (IPersistentMap) Transaction.get(_attrs);
}
public void remove(Object key) throws Exception {
- IPersistentMap t = (IPersistentMap) Transaction.get2( _attrs);
+ IPersistentMap t = (IPersistentMap) Transaction.get( _attrs);
t = t.remove(key);
- Transaction.set2(_attrs,t);
+ Transaction.set(_attrs,t);
}
}
diff --git a/src/jvm/clojure/lang/Transaction.java b/src/jvm/clojure/lang/Transaction.java
index 3f7862a2..3cfc38e1 100644
--- a/src/jvm/clojure/lang/Transaction.java
+++ b/src/jvm/clojure/lang/Transaction.java
@@ -63,28 +63,28 @@ static public Object runInTransaction(IFn fn) throws Exception{
static public TRef tref(Object val) throws Exception{
Transaction trans = ThreadLocalData.getTransaction();
TRef tref = new TRef();
- trans.set(tref, val);
+ trans.doSet(tref, val);
return tref;
}
//*
-static public Object get2(TRef tref) throws Exception{
+static public Object get(TRef tref) throws Exception{
Transaction trans = ThreadLocalData.getTransaction();
if(trans != null)
- return trans.get(tref);
+ return trans.doGet(tref);
return getCurrent(tref).val;
}
-static public Object set2(TRef tref, Object val) throws Exception{
- return ThreadLocalData.getTransaction().set(tref,val);
+static public Object set(TRef tref, Object val) throws Exception{
+ return ThreadLocalData.getTransaction().doSet(tref,val);
}
-static public void touch2(TRef tref) throws Exception{
- ThreadLocalData.getTransaction().touch(tref);
+static public void touch(TRef tref) throws Exception{
+ ThreadLocalData.getTransaction().doTouch(tref);
}
-static public void commutate2(TRef tref, IFn fn) throws Exception{
- ThreadLocalData.getTransaction().commutate(tref, fn);
+static public void commutate(TRef tref, IFn fn) throws Exception{
+ ThreadLocalData.getTransaction().doCommutate(tref, fn);
}
//*/
@@ -190,7 +190,7 @@ Transaction(){
}
}
-Object get(TRef tref) throws Exception{
+Object doGet(TRef tref) throws Exception{
if(sets != null && sets.containsKey(tref))
return sets.get(tref);
@@ -214,7 +214,7 @@ static TVal getCurrent(TRef tref) throws Exception{
return null;
}
-Object set(TRef tref, Object val) throws Exception{
+Object doSet(TRef tref, Object val) throws Exception{
if(sets == null)
sets = new IdentityHashMap<TRef,Object>();
if(commutates != null && commutates.containsKey(tref))
@@ -224,11 +224,11 @@ Object set(TRef tref, Object val) throws Exception{
return val;
}
-void touch(TRef tref) throws Exception{
- set(tref, get(tref));
+void doTouch(TRef tref) throws Exception{
+ doSet(tref, doGet(tref));
}
-void commutate(TRef tref, IFn fn) throws Exception{
+void doCommutate(TRef tref, IFn fn) throws Exception{
if(commutates == null)
commutates = new IdentityHashMap<TRef,ISeq>();
if(sets != null && sets.containsKey(tref))