public final Event<Boolean> updateFromSource(final Long dataTagId,final SourceDataTagValue sourceDataTagValue){
  tagCache.acquireWriteLockOnKey(dataTagId);
  try {
    T dataTag=tagCache.get(dataTagId);
    if (sourceDataTagValue != null && sourceDataTagValue.getValue() != null && isKnownClass(dataTag.getDataType())) {
      Object convertedValue=TypeConverter.cast(sourceDataTagValue.getValue(),dataTag.getDataType());
      sourceDataTagValue.setValue(convertedValue);
    }
    Event<Boolean> returnEvent=updateFromSource(dataTag,sourceDataTagValue);
    if (returnEvent.getReturnValue()) {
      tagCache.put(dataTagId,dataTag);
    }
    return returnEvent;
  }
  finally {
    tagCache.releaseWriteLockOnKey(dataTagId);
  }
}

public final Event < Boolean > updateFromSource ( final Long dataTagId , final SourceDataTagValue sourceDataTagValue ) { tagCache . acquireWriteLockOnKey ( dataTagId ) ; try { T dataTag = tagCache . get ( dataTagId ) ; if ( sourceDataTagValue != null && sourceDataTagValue . getValue ( ) != null && isKnownClass ( dataTag . getDataType ( ) ) ) { Object convertedValue = TypeConverter . cast ( sourceDataTagValue . getValue ( ) , dataTag . getDataType ( ) ) ; sourceDataTagValue . setValue ( convertedValue ) ; } Event < Boolean > returnEvent = updateFromSource ( dataTag , sourceDataTagValue ) ; if ( returnEvent . getReturnValue ( ) ) { tagCache . put ( dataTagId , dataTag ) ; } return returnEvent ; } finally { tagCache . releaseWriteLockOnKey ( dataTagId ) ; } }
updates the datatag in the cache from the passed sourcedatatagvalue . the method notifies any cache listeners if an update is made . < p > the cache timestamp is set to the current time . the daq and source timestamps are set to the values received in the sourcedatatagvalue .
