Package ghidra.trace.database.thread
Class DBTraceThreadManager
java.lang.Object
ghidra.trace.database.thread.DBTraceThreadManager
- All Implemented Interfaces:
ErrorHandler,DBTraceManager,TraceThreadManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ReadWriteLockprotected final DBTraceObjectManagerprotected final DBTrace -
Constructor Summary
ConstructorsConstructorDescriptionDBTraceThreadManager(DBHandle dbh, OpenMode openMode, ReadWriteLock lock, TaskMonitor monitor, DBTrace trace, DBTraceObjectManager objectManager) -
Method Summary
Modifier and TypeMethodDescriptionAdd a thread with the given lifespanAdd a thread with the given lifespanassertIsMine(TraceThread thread) voidNotification that an IO exception occurred.Collection<? extends TraceThread> Get all threads ordered eldest firstgetLiveThreadByPath(long snap, String path) Get the live thread at the given snap by the given pathCollection<? extends TraceThread> getLiveThreads(long snap) Get live threads at the given snap, ordered eldest firstgetThread(long key) Get the thread with the given keyCollection<? extends TraceThread> getThreadsByPath(String path) Get all threads with the given name, ordered eldest firstvoidinvalidateCache(boolean all) Invalidate this manager's cachesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.trace.model.thread.TraceThreadManager
createThread, createThread
-
Field Details
-
lock
-
trace
-
objectManager
-
-
Constructor Details
-
DBTraceThreadManager
public DBTraceThreadManager(DBHandle dbh, OpenMode openMode, ReadWriteLock lock, TaskMonitor monitor, DBTrace trace, DBTraceObjectManager objectManager) throws IOException, VersionException - Throws:
IOExceptionVersionException
-
-
Method Details
-
dbError
Description copied from interface:ErrorHandlerNotification that an IO exception occurred.- Specified by:
dbErrorin interfaceErrorHandler- Parameters:
e-IOExceptionwhich was cause of error
-
invalidateCache
public void invalidateCache(boolean all) Description copied from interface:DBTraceManagerInvalidate this manager's caches- Specified by:
invalidateCachein interfaceDBTraceManager- Parameters:
all- probably nothing. Check out implementations ofManagerDB.invalidateCache(boolean).
-
assertIsMine
-
addThread
Description copied from interface:TraceThreadManagerAdd a thread with the given lifespan- Specified by:
addThreadin interfaceTraceThreadManager- Parameters:
path- the "full name" of the threadlifespan- the lifespan of the thread- Returns:
- the new thread
- Throws:
DuplicateNameException- if a thread with the given full name already exists within an overlapping snap
-
addThread
public TraceThread addThread(String path, String display, Lifespan lifespan) throws DuplicateNameException Description copied from interface:TraceThreadManagerAdd a thread with the given lifespan- Specified by:
addThreadin interfaceTraceThreadManager- Parameters:
path- the "full name" of the threaddisplay- "short name" of the threadlifespan- the lifespan of the thread- Returns:
- the new thread
- Throws:
DuplicateNameException- if a thread with the given full name already exists within an overlapping snap
-
getAllThreads
Description copied from interface:TraceThreadManagerGet all threads ordered eldest first- Specified by:
getAllThreadsin interfaceTraceThreadManager- Returns:
- the collection
-
getThreadsByPath
Description copied from interface:TraceThreadManagerGet all threads with the given name, ordered eldest first- Specified by:
getThreadsByPathin interfaceTraceThreadManager- Parameters:
path- the name- Returns:
- the collection
-
getLiveThreadByPath
Description copied from interface:TraceThreadManagerGet the live thread at the given snap by the given path- Specified by:
getLiveThreadByPathin interfaceTraceThreadManager- Parameters:
snap- the snap which the thread's lifespan must containpath- the path of the thread- Returns:
- the thread, or
nullif no thread matches
-
getThread
Description copied from interface:TraceThreadManagerGet the thread with the given key- Specified by:
getThreadin interfaceTraceThreadManager- Parameters:
key- the database key- Returns:
- the thread
-
getLiveThreads
Description copied from interface:TraceThreadManagerGet live threads at the given snap, ordered eldest firstNote that thread whose destruction was observed at the given snap are not considered alive, i.e, the upper end of the lifespan is treated as open.
- Specified by:
getLiveThreadsin interfaceTraceThreadManager- Parameters:
snap- the snap- Returns:
- the collection
-