Package ghidra.trace.model.thread
Interface TraceThreadManager
- All Known Implementing Classes:
DBTraceThreadManager
public interface TraceThreadManager
A store for observed threads over time in a trace
Note that the methods returning collections of threads order them eldest first. "Eldest" means lowest database key, which does not necessarily correlate to earliest creation snap.
-
Method Summary
Modifier and TypeMethodDescriptionAdd a thread with the given lifespanAdd a thread with the given lifespandefault TraceThreadcreateThread(String path, long creationSnap) Add a thread with the given creation snapdefault TraceThreadcreateThread(String path, String display, long creationSnap) Add a thread with the given creation snapCollection<? 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 name) Get all threads with the given name, ordered eldest first
-
Method Details
-
addThread
Add a thread with the given lifespan- 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
Add a thread with the given lifespan- 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
-
createThread
Add a thread with the given creation snap- Throws:
DuplicateNameException- See Also:
-
createThread
default TraceThread createThread(String path, String display, long creationSnap) throws DuplicateNameException Add a thread with the given creation snap- Throws:
DuplicateNameException- See Also:
-
getAllThreads
Collection<? extends TraceThread> getAllThreads()Get all threads ordered eldest first- Returns:
- the collection
-
getThreadsByPath
Get all threads with the given name, ordered eldest first- Parameters:
name- the name- Returns:
- the collection
-
getLiveThreadByPath
Get the live thread at the given snap by the given path- 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
Get the thread with the given key- Parameters:
key- the database key- Returns:
- the thread
-
getLiveThreads
Get 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.
- Parameters:
snap- the snap- Returns:
- the collection
-