home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / sun / misc / AtomicLongCSImpl.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  446 b   |  28 lines

  1. package sun.misc;
  2.  
  3. class AtomicLongCSImpl extends AtomicLong {
  4.    private volatile long value;
  5.  
  6.    protected AtomicLongCSImpl(long var1) {
  7.       this.value = var1;
  8.    }
  9.  
  10.    public long get() {
  11.       return this.value;
  12.    }
  13.  
  14.    public native boolean attemptUpdate(long var1, long var3);
  15.  
  16.    public boolean attemptSet(long var1) {
  17.       return this.attemptUpdate(this.value, var1);
  18.    }
  19.  
  20.    public synchronized boolean attemptIncrememt() {
  21.       return this.attemptUpdate(this.value, this.value + 1L);
  22.    }
  23.  
  24.    public synchronized boolean attemptAdd(long var1) {
  25.       return this.attemptUpdate(this.value, this.value + var1);
  26.    }
  27. }
  28.