This class may be removed in the future. Consider the replacements in JEP 193 'Variable Handles': http://openjdk.java.net/jeps/193
/** * Atomically exchanges provided <code>newValue</code> with the current value of field or array element, with * provided <code>offset</code>. */ public static long getAndSetLong( Object object, long offset, long newValue ) { return unsafe.getAndSetLong( object, offset, newValue ); }
@Override protected long getAndReset(long[] cells, long offset) { return UNSAFE.getAndSetLong(cells, offset, 0L); } }
/** * Get the current value of a counter and atomically set it to a new value. * * @param value to be set. * @return the previous value of the counter */ public long getAndSet(final long value) { return UnsafeAccess.UNSAFE.getAndSetLong(byteArray, addressOffset, value); }
public long getAndSetLong(final long index, final long value) { if (SHOULD_BOUNDS_CHECK) { boundsCheck0(index, SIZE_OF_LONG); } return UNSAFE.getAndSetLong(null, addressOffset + index, value); }
public long getAndSetLong(final int index, final long value) { if (SHOULD_BOUNDS_CHECK) { boundsCheck0(index, SIZE_OF_LONG); } return UNSAFE.getAndSetLong(byteArray, addressOffset + index, value); }
/** * Get the current value of a counter and atomically set it to a new value. * * @param value to be set. * @return the previous value of the counter */ public long getAndSet(final long value) { return UnsafeAccess.UNSAFE.getAndSetLong(byteArray, addressOffset, value); }
/** * CASes the base field. */ final long getAndSetBase(long val) { return U.getAndSetLong(this, BASE, val); }
/** * Atomically sets to the given value and returns the old value. * * @param newValue the new value * @return the previous value */ public final long getAndSet(long newValue) { return unsafe.getAndSetLong(this, valueOffset, newValue); }
/** * Atomically exchanges provided <code>newValue</code> with the current value of field or array element, with * provided <code>offset</code>. */ public static long getAndSetLong( Object object, long offset, long newValue ) { return unsafe.getAndSetLong( object, offset, newValue ); }
/** * CASes the base field. */ final long getAndSetBase(long val) { return U.getAndSetLong(this, BASE, val); }
public long getAndSet(long update) { return UnsafeAccess.UNSAFE.getAndSetLong(this, OFFSET, update); } }
public long getAndSet(long update) { return UnsafeAccess.UNSAFE.getAndSetLong(this, OFFSET, update); } }
/** * {@inheritDoc} */ @Override public final long getAndSet(T obj, long newValue) { return unsafe.getAndSetLong(obj, offset, newValue); }
public long getAndSetLong(final long index, final long value) { if (SHOULD_BOUNDS_CHECK) { boundsCheck0(index, SIZE_OF_LONG); } return UNSAFE.getAndSetLong(null, addressOffset + index, value); }
public long getAndSetLong(final long index, final long value) { if (SHOULD_BOUNDS_CHECK) { boundsCheck0(index, SIZE_OF_LONG); } return UNSAFE.getAndSetLong(null, addressOffset + index, value); }
public long getAndSetLong(final int index, final long value) { if (SHOULD_BOUNDS_CHECK) { boundsCheck0(index, SIZE_OF_LONG); } return UNSAFE.getAndSetLong(byteArray, addressOffset + index, value); }
static long getAndPutLong(long address, long offset, long value) { validate(address, offset, 8L); return unsafe.getAndSetLong(null, address + offset, value); }
static long getAndPutLong(long address, long offset, long value) { validate(address, offset, 8L); return unsafe.getAndSetLong(null, address + offset, value); }
public long getAndSetLong(final int index, final long value) { if (SHOULD_BOUNDS_CHECK) { boundsCheck0(index, SIZE_OF_LONG); } return UNSAFE.getAndSetLong(byteArray, addressOffset + index, value); }
public long getAndSetLong(final int index, final long value) { if (SHOULD_BOUNDS_CHECK) { boundsCheck0(index, SIZE_OF_LONG); } return UNSAFE.getAndSetLong(byteArray, addressOffset + index, value); }