Synchronized method for adding a new conent

@param record
@param filename
355298
protected synchronized void addContent(Artifact record, String filename) {
        if (record != null) {
            if (filename.endsWith(".jar")) {
                // this is an embedded archive
                embedded.add(record);
            } else {
                contents.add(record);
            }
        }
    }
154155
public void update(Record record, boolean isText) throws MPXJException
   {
      int length = record.getLength();

      for (int i = 0; i < length; i++)
      {
         if (isText == true)
         {
            add(getTaskCode(record.getString(i)));
         }
         else
         {
            add(record.getInteger(i).intValue());
         }
      }
   }
964667
public void add(SingleCSVRecord record) {
        if (records == null)
            records = new ArrayList<>();
        records.add(record);
    }
1125423
protected void update(MetricsRecordImpl record) {
    String recordName = record.getRecordName();
    TagMap tagTable = record.getTagTable();
    Map<String,MetricValue> metricUpdates = record.getMetricTable();
        
    RecordMap recordMap = getRecordMap(recordName);
    synchronized (recordMap) {
      MetricMap metricMap = recordMap.get(tagTable);
      if (metricMap == null) {
        metricMap = new MetricMap();
        TagMap tagMap = new TagMap(tagTable); // clone tags
        recordMap.put(tagMap, metricMap);
      }

      Set<Entry<String, MetricValue>> entrySet = metricUpdates.entrySet();
      for (Entry<String, MetricValue> entry : entrySet) {
        String metricName = entry.getKey ();
        MetricValue updateValue = entry.getValue ();
        Number updateNumber = updateValue.getNumber();
        Number currentNumber = metricMap.get(metricName);
        if (currentNumber == null || updateValue.isAbsolute()) {
          metricMap.put(metricName, updateNumber);
        }
        else {
          Number newNumber = sum(updateNumber, currentNumber);
          metricMap.put(metricName, newNumber);
        }
      }
    }
  }
490391
public void processRecordInternally(Record record) {
        if (record instanceof FormatRecord) {
            FormatRecord fr = (FormatRecord) record;
            _customFormatRecords.put(Integer.valueOf(fr.getIndexCode()), fr);
        }
        if (record instanceof ExtendedFormatRecord) {
            ExtendedFormatRecord xr = (ExtendedFormatRecord) record;
            _xfRecords.add(xr);
        }
    }
890511
@Override
  public void publish(final LogRecord record) {
    if (record == null) {
      return;
    }

    if (!isLoggable(record)) {
      return;
    }

    synchronized (this) {
      this.logs.add(record);
      if (!this.driverInitialized || this.logs.size() < BUFFER_LEN) {
        return;
      }
    }

    logAll();
  }
736181
public void init(Rec record)
    {
        m_objCurrentKey = null;
        m_mDataMap = new TreeMap<Object,Object>();
        m_iCurrentRecord = -1;
        m_iterator = null;
    }
507386
public void doAdd(Record record) throws DBException
    {
        m_LastModifiedBookmark = null;
        try   {
            m_pTable.add(this);
            m_LastModifiedBookmark = this.getHandle(DBConstants.BOOKMARK_HANDLE);
        } catch (DBException ex)    {
            throw DatabaseException.toDatabaseException(ex);
        }
    }
389575
public synchronized void addFile(String filename, String filePath) {
        // fix this to check if duplicate name exists.
        int fileIndex = fileNameList.indexOf(filename);
        if (fileIndex == -1) {
            fileNameList.add(filename);
            filePathList.add(filePath);
        }
    }
272462
def _create_record(self, rtype, name, content):
        
        result = False
        name = self._relative_name(name)
        ttl = None

        # TODO: shoud assert that this is an int
        if self.ttl:
            ttl = self.ttl

        with localzone.manage(self.filename, self.origin, autosave=True) as zone:
            if zone.add_record(name, rtype, content, ttl=ttl):  # pylint: disable=no-member
                result = True

        LOGGER.debug("create_record: %s", result)
        return result
12991
public void init(Record record)
    {
        super.init(record);
        this.setMasterSlaveFlag(FileListener.RUN_IN_MASTER | FileListener.DONT_REPLICATE_TO_SLAVE);
    }
923207
public void updateRecord(final ORecordInternal<?> record) {
    if (isEnabled() && record.getIdentity().getClusterId() != excludedCluster && record.getIdentity().isValid()) {
      underlying.lock(record.getIdentity());
      try {
        if (underlying.get(record.getIdentity()) != record)
          underlying.put(record);
      } finally {
        underlying.unlock(record.getIdentity());
      }
    }

    secondary.updateRecord(record);
  }
995351
public void
addRecord(Record r) {
	Name name = r.getName();
	int rtype = r.getRRsetType();
	synchronized (this) {
		RRset rrset = findRRset(name, rtype);
		if (rrset == null) {
			rrset = new RRset(r);
			addRRset(name, rrset);
		} else {
			rrset.addRR(r);
		}
	}
}
301443
public void add(CSVRecord record) {
        if (records == null)
            records = new ArrayList<>();
        records.add(record);
    }
806188
public void init(Record record, DateTimeField field, String mainFilesFieldName)
    {
        super.init(record);
        m_field = field;
        if (field != null)
            if (field.getRecord() != record)
                field.addListener(new FieldRemoveBOnCloseHandler(this));
        this.mainFilesFieldName = mainFilesFieldName;
    }
331240
public void addAll(HashMap<Integer, char[]> records) {
    for (Entry<Integer, char[]> e : records.entrySet()) {
      this.add(e.getValue(), e.getKey());
    }
  }
279847
public long addRecord(final ORecordId iRid, final byte[] iContent) throws IOException {

    if (iContent.length == 0)
      // AVOID UNUSEFUL CREATION OF EMPTY RECORD: IT WILL BE CREATED AT FIRST UPDATE
      return -1;

    final int recordSize = iContent.length + RECORD_FIX_SIZE;

    acquireExclusiveLock();
    try {

      final long[] newFilePosition = getFreeSpace(recordSize);
      writeRecord(newFilePosition, iRid.clusterId, iRid.clusterPosition, iContent);
      return getAbsolutePosition(newFilePosition);

    } finally {
      releaseExclusiveLock();
    }
  }