home *** CD-ROM | disk | FTP | other *** search
- package sun.misc;
-
- public abstract class Ref {
- static long lruclock;
- private Object thing;
- private long priority;
-
- public Object get() {
- Object var1 = this.thing;
- if (var1 == null) {
- synchronized(this){}
-
- try {
- if ((var1 = this.thing) == null) {
- var1 = this.reconstitute();
- this.thing = var1;
- }
- } catch (Throwable var4) {
- throw var4;
- }
- }
-
- this.priority = ++lruclock;
- return var1;
- }
-
- public abstract Object reconstitute();
-
- public void flush() {
- this.thing = null;
- }
-
- public void setThing(Object var1) {
- this.thing = var1;
- }
-
- public Object check() {
- return this.thing;
- }
-
- public Ref() {
- this.priority = ++lruclock;
- }
- }
-