public void add(TransactionLogRecord record) { Object key = record.getKey(); // there should be just one tx log for the same key. so if there is older we are removing it if (key != null) { TransactionLogRecord removed = recordMap.remove(key); if (removed != null) { recordList.remove(removed); } } recordList.add(record); if (key != null) { recordMap.put(key, record); } }
public void add(TransactionLogRecord record) { Object key = record.getKey(); // there should be just one tx log for the same key. so if there is older we are removing it if (key != null) { TransactionLogRecord removed = recordMap.remove(key); if (removed != null) { recordList.remove(removed); } } recordList.add(record); if (key != null) { recordMap.put(key, record); } }