Skip to content
Snippets Groups Projects
Commit 15337acc authored by apriestman's avatar apriestman
Browse files

Change to AtomicBoolean

parent 465c0bf5
No related branches found
No related tags found
No related merge requests found
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import java.util.Date; import java.util.Date;
import java.util.EnumMap; import java.util.EnumMap;
...@@ -192,7 +193,7 @@ public class SleuthkitCase { ...@@ -192,7 +193,7 @@ public class SleuthkitCase {
private SleuthkitJNI.CaseDbHandle caseHandle; private SleuthkitJNI.CaseDbHandle caseHandle;
private final String caseHandleIdentifier; // Used to identify this case in the JNI cache. private final String caseHandleIdentifier; // Used to identify this case in the JNI cache.
private String dbBackupPath; private String dbBackupPath;
private boolean timelineEventsDisabled = false; private AtomicBoolean timelineEventsDisabled = new AtomicBoolean(false);
   
private CaseDbSchemaVersionNumber caseDBSchemaCreationVersion; private CaseDbSchemaVersionNumber caseDBSchemaCreationVersion;
   
...@@ -3071,8 +3072,8 @@ private static String createCaseDataBaseName(String candidateDbName) { ...@@ -3071,8 +3072,8 @@ private static String createCaseDataBaseName(String candidateDbName) {
* This setting is not saved to the case database. * This setting is not saved to the case database.
*/ */
@Beta @Beta
public synchronized void disableTimelineEventCreation() { public void disableTimelineEventCreation() {
timelineEventsDisabled = true; timelineEventsDisabled.set(true);
} }
   
/** /**
...@@ -7113,7 +7114,7 @@ public FsContent addFileSystemFile(long dataSourceObjId, long fsObjId, ...@@ -7113,7 +7114,7 @@ public FsContent addFileSystemFile(long dataSourceObjId, long fsObjId,
DerivedFile derivedFile = new DerivedFile(this, objectId, dataSourceObjId, fsObjId, fileName, dirType, metaType, dirFlag, metaFlags, DerivedFile derivedFile = new DerivedFile(this, objectId, dataSourceObjId, fsObjId, fileName, dirType, metaType, dirFlag, metaFlags,
size, ctime, crtime, atime, mtime, md5Hash, sha256Hash, sha1Hash, null, parentPath, null, parent.getId(), mimeType, null, extension, ownerUid, osAccountId); size, ctime, crtime, atime, mtime, md5Hash, sha256Hash, sha1Hash, null, parentPath, null, parent.getId(), mimeType, null, extension, ownerUid, osAccountId);
   
if (!timelineEventsDisabled) { if (!timelineEventsDisabled.get()) {
timelineManager.addEventsForNewFile(derivedFile, connection); timelineManager.addEventsForNewFile(derivedFile, connection);
} }
   
...@@ -7854,7 +7855,7 @@ public DerivedFile addDerivedFile(String fileName, String localPath, ...@@ -7854,7 +7855,7 @@ public DerivedFile addDerivedFile(String fileName, String localPath,
DerivedFile derivedFile = new DerivedFile(this, newObjId, dataSourceObjId, fsObjId, fileName, dirType, metaType, dirFlag, metaFlags, DerivedFile derivedFile = new DerivedFile(this, newObjId, dataSourceObjId, fsObjId, fileName, dirType, metaType, dirFlag, metaFlags,
savedSize, ctime, crtime, atime, mtime, null, null, null, null, parentPath, localPath, parentId, null, encodingType, extension, OsAccount.NO_OWNER_ID, OsAccount.NO_ACCOUNT); savedSize, ctime, crtime, atime, mtime, null, null, null, null, parentPath, localPath, parentId, null, encodingType, extension, OsAccount.NO_OWNER_ID, OsAccount.NO_ACCOUNT);
   
if (!timelineEventsDisabled) { if (!timelineEventsDisabled.get()) {
timelineManager.addEventsForNewFile(derivedFile, connection); timelineManager.addEventsForNewFile(derivedFile, connection);
} }
   
...@@ -8285,7 +8286,7 @@ public LocalFile addLocalFile(String fileName, String localPath, ...@@ -8285,7 +8286,7 @@ public LocalFile addLocalFile(String fileName, String localPath,
localPath, localPath,
encodingType, extension, encodingType, extension,
ownerAccount, osAccountId); ownerAccount, osAccountId);
if (!timelineEventsDisabled) { if (!timelineEventsDisabled.get()) {
getTimelineManager().addEventsForNewFile(localFile, connection); getTimelineManager().addEventsForNewFile(localFile, connection);
} }
return localFile; return localFile;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment