public synchronized T acquireModify(T newData) throws CacheException {
  if (LOG.isTraceEnabled())   LOG.trace("Acquire modify newdata " + getVarName());
  long t0=DMLScript.STATISTICS ? System.nanoTime() : 0;
  if (!isAvailableToModify())   throw new CacheException("CacheableData not available to modify.");
  clearData();
  acquire(true,false);
  setDirty(true);
  _isAcquireFromEmpty=false;
  if (newData == null)   throw new CacheException("acquireModify with empty cache block.");
  _data=newData;
  updateStatusPinned(true);
  if (DMLScript.STATISTICS) {
    long t1=System.nanoTime();
    CacheStatistics.incrementAcquireMTime(t1 - t0);
  }
  return _data;
}

public synchronized T acquireModify ( T newData ) throws CacheException { if ( LOG . isTraceEnabled ( ) ) LOG . trace ( "Acquire modify newdata " + getVarName ( ) ) ; long t0 = DMLScript . STATISTICS ? System . nanoTime ( ) : 0 ; if ( ! isAvailableToModify ( ) ) throw new CacheException ( "CacheableData not available to modify." ) ; clearData ( ) ; acquire ( true , false ) ; setDirty ( true ) ; _isAcquireFromEmpty = false ; if ( newData == null ) throw new CacheException ( "acquireModify with empty cache block." ) ; _data = newData ; updateStatusPinned ( true ) ; if ( DMLScript . STATISTICS ) { long t1 = System . nanoTime ( ) ; CacheStatistics . incrementAcquireMTime ( t1 - t0 ) ; } return _data ; }
acquires the exclusive " write " lock for a thread that wants to throw away the old cache block data and link up with new cache block data . abandons the old data without reading it and sets the new data reference . in - status : empty , evictable , evicted ; out - status : modify .
