public class ThreadList extends java.lang.Object implements java.lang.Cloneable, java.lang.Iterable<ThreadInfo>, Restorable<ThreadList>
Modifier and Type | Class and Description |
---|---|
static class |
ThreadList.Count |
Modifier and Type | Field and Description |
---|---|
protected int |
maxTid |
protected boolean |
reuseTid |
protected ThreadInfo[] |
threads |
Modifier | Constructor and Description |
---|---|
protected |
ThreadList() |
|
ThreadList(Config config,
KernelState ks)
Creates a new empty thread list.
|
protected boolean reuseTid
protected ThreadInfo[] threads
protected int maxTid
protected ThreadList()
public ThreadList(Config config, KernelState ks)
public Memento<ThreadList> getMemento(MementoFactory factory)
getMemento
in interface Restorable<ThreadList>
public Memento<ThreadList> getMemento()
public java.lang.Object clone()
clone
in class java.lang.Object
public int add(ThreadInfo ti)
public boolean remove(ThreadInfo ti)
public ThreadInfo[] getThreads()
public void hash(HashData hd)
public ThreadInfo getThreadInfoForId(int tid)
public ThreadInfo getThreadInfoForObjRef(int objRef)
public boolean contains(ThreadInfo ti)
public int length()
public void setAll(ThreadInfo[] threads)
public ThreadInfo locate(int objref)
public void markRoots(Heap heap)
public boolean hasProcessTimeoutRunnables(ApplicationContext appCtx)
public ThreadInfo[] getProcessTimeoutRunnables(ApplicationContext appCtx)
public boolean hasLiveThreads()
public boolean hasTimeoutRunnables()
public boolean hasUnblockedThreads()
public ThreadInfo[] getTimeoutRunnables()
public boolean hasAnyMatching(Predicate<ThreadInfo> predicate)
public boolean hasAnyMatchingOtherThan(ThreadInfo ti, Predicate<ThreadInfo> predicate)
public boolean hasOnlyMatching(Predicate<ThreadInfo> predicate)
public boolean hasOnlyMatchingOtherThan(ThreadInfo ti, Predicate<ThreadInfo> predicate)
public ThreadInfo[] getAllMatching(Predicate<ThreadInfo> predicate)
public ThreadInfo[] getAllMatchingWith(ThreadInfo ti, Predicate<ThreadInfo> predicate)
public ThreadInfo[] getAllMatchingWithout(ThreadInfo ti, Predicate<ThreadInfo> predicate)
public int getMatchingCount(Predicate<ThreadInfo> predicate)
public ThreadInfo getFirstMatching(Predicate<ThreadInfo> predicate)
public ThreadList.Count getCountWithout(ThreadInfo tiExclude)
public ThreadList.Count getCount()
public void dump()
public java.util.Iterator<ThreadInfo> iterator()
iterator
in interface java.lang.Iterable<ThreadInfo>
public java.util.Iterator<ThreadInfo> canonicalLiveIterator()
public void checkConsistency(boolean isStore)