MCPcopy Index your code
hub / github.com/clojure/clojure / Ref

Class Ref

src/jvm/clojure/lang/Ref.java:19–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17import java.util.concurrent.locks.ReentrantReadWriteLock;
18
19public class Ref extends ARef implements IFn, Comparable<Ref>, IRef{
20 public int compareTo(Ref ref) {
21 if(this.id == ref.id)
22 return 0;
23 else if(this.id < ref.id)
24 return -1;
25 else
26 return 1;
27 }
28
29public int getMinHistory(){
30 return minHistory;
31}
32
33public Ref setMinHistory(int minHistory){
34 this.minHistory = minHistory;
35 return this;
36}
37
38public int getMaxHistory(){
39 return maxHistory;
40}
41
42public Ref setMaxHistory(int maxHistory){
43 this.maxHistory = maxHistory;
44 return this;
45}
46
47public static class TVal{
48 Object val;
49 long point;
50 TVal prior;
51 TVal next;
52
53 TVal(Object val, long point, TVal prior){
54 this.val = val;
55 this.point = point;
56 this.prior = prior;
57 this.next = prior.next;
58 this.prior.next = this;
59 this.next.prior = this;
60 }
61
62 TVal(Object val, long point){
63 this.val = val;
64 this.point = point;
65 this.next = this;
66 this.prior = this;
67 }
68
69}
70
71TVal tvals;
72final AtomicInteger faults;
73final ReentrantReadWriteLock lock;
74LockingTransaction.Info tinfo;
75//IFn validator;
76final long id;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected