Sleuth Kit Java Bindings (JNI)  4.4.1
Java bindings for using The Sleuth Kit
org.sleuthkit.datamodel.SleuthkitJNI.HandleCache Class Reference

Static Private Member Functions

static void addFileHandle (long fileHandle, long fsHandle)
 
static void closeHandlesAndClearCache () throws TskCoreException
 
static boolean isValidFileHandle (long fileHandle)
 
static void removeFileHandle (long fileHandle)
 

Static Private Attributes

static final Object cacheLock = new Object()
 
static final Set< Long > fileHandleCache = new HashSet<Long>()
 
static final Map< Long, List< Long > > fileSystemToFileHandles = new HashMap<Long, List<Long>>()
 
static final Map< Long, Map< Long, Long > > fsHandleCache = new HashMap<Long, Map<Long, Long>>()
 
static final Map< String, Long > imageHandleCache = new HashMap<String, Long>()
 
static final String INVALID_FILE_HANDLE = "Invalid file handle."
 

Detailed Description

Cache of all handles allocated in the JNI layer. Used for: (a) quick lookup of frequently used handles (e.g. file system and image) (b) ensuring all handles passed in by clients of SleuthkitJNI are valid. (c) consistent cleanup of handles on closure.

Definition at line 68 of file SleuthkitJNI.java.

Member Function Documentation

static void org.sleuthkit.datamodel.SleuthkitJNI.HandleCache.addFileHandle ( long  fileHandle,
long  fsHandle 
)
staticprivate

Add a new file handle to the cache.

Parameters
fileHandleThe new file handle.
fsHandleThe file system handle in which the file lives.

Definition at line 103 of file SleuthkitJNI.java.

References org.sleuthkit.datamodel.SleuthkitJNI.HandleCache.cacheLock.

Referenced by org.sleuthkit.datamodel.SleuthkitJNI.openFile().

static void org.sleuthkit.datamodel.SleuthkitJNI.HandleCache.closeHandlesAndClearCache ( ) throws TskCoreException
staticprivate
static void org.sleuthkit.datamodel.SleuthkitJNI.HandleCache.removeFileHandle ( long  fileHandle)
staticprivate

Member Data Documentation

final Set<Long> org.sleuthkit.datamodel.SleuthkitJNI.HandleCache.fileHandleCache = new HashSet<Long>()
staticprivate

Definition at line 91 of file SleuthkitJNI.java.

final Map<Long, List<Long> > org.sleuthkit.datamodel.SleuthkitJNI.HandleCache.fileSystemToFileHandles = new HashMap<Long, List<Long>>()
staticprivate

Definition at line 93 of file SleuthkitJNI.java.

final Map<Long, Map<Long, Long> > org.sleuthkit.datamodel.SleuthkitJNI.HandleCache.fsHandleCache = new HashMap<Long, Map<Long, Long>>()
staticprivate
final Map<String, Long> org.sleuthkit.datamodel.SleuthkitJNI.HandleCache.imageHandleCache = new HashMap<String, Long>()
staticprivate

Definition at line 79 of file SleuthkitJNI.java.

Referenced by org.sleuthkit.datamodel.SleuthkitJNI.openImage().

final String org.sleuthkit.datamodel.SleuthkitJNI.HandleCache.INVALID_FILE_HANDLE = "Invalid file handle."
staticprivate

The documentation for this class was generated from the following file:

Copyright © 2011-2015 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.