Package org.onlab.util
Class GroupedThreadFactory
- java.lang.Object
-
- org.onlab.util.GroupedThreadFactory
-
- All Implemented Interfaces:
java.util.concurrent.ThreadFactory
public final class GroupedThreadFactory extends java.lang.Object implements java.util.concurrent.ThreadFactoryThread factory for creating threads that belong to the specified thread group.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDELIMITER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GroupedThreadFactorygroupedThreadFactory(java.lang.String groupName)Returns thread factory for producing threads associated with the specified group name.java.lang.ThreadnewThread(java.lang.Runnable r)java.lang.ThreadGroupthreadGroup()Returns the thread group associated with the factory.java.lang.StringtoString()
-
-
-
Field Detail
-
DELIMITER
public static final java.lang.String DELIMITER
- See Also:
- Constant Field Values
-
-
Method Detail
-
groupedThreadFactory
public static GroupedThreadFactory groupedThreadFactory(java.lang.String groupName)
Returns thread factory for producing threads associated with the specified group name. The group name-space is hierarchical, based on slash-delimited name segments, e.g.onos/intent.- Parameters:
groupName- group name- Returns:
- thread factory
-
threadGroup
public java.lang.ThreadGroup threadGroup()
Returns the thread group associated with the factory.- Returns:
- thread group
-
newThread
public java.lang.Thread newThread(java.lang.Runnable r)
- Specified by:
newThreadin interfacejava.util.concurrent.ThreadFactory
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-