Synchronized necessary methods in HashDbManager.

This commit is contained in:
Oliver Spohngellert
2016-04-18 12:52:44 -04:00
parent dffe4bb551
commit 2b839ecb82
@@ -138,7 +138,7 @@ public class HashDbManager implements PropertyChangeListener {
*
* @throws HashDbManagerException
*/
public HashDb addExistingHashDatabase(String hashSetName, String path, boolean searchDuringIngest, boolean sendIngestMessages, HashDb.KnownFilesType knownFilesType) throws HashDbManagerException {
public synchronized HashDb addExistingHashDatabase(String hashSetName, String path, boolean searchDuringIngest, boolean sendIngestMessages, HashDb.KnownFilesType knownFilesType) throws HashDbManagerException {
HashDb hashDb = null;
try {
if (!new File(path).exists()) {
@@ -188,7 +188,7 @@ public class HashDbManager implements PropertyChangeListener {
*
* @throws HashDbManagerException
*/
public HashDb addNewHashDatabase(String hashSetName, String path, boolean searchDuringIngest, boolean sendIngestMessages,
public synchronized HashDb addNewHashDatabase(String hashSetName, String path, boolean searchDuringIngest, boolean sendIngestMessages,
HashDb.KnownFilesType knownFilesType) throws HashDbManagerException {
HashDb hashDb = null;