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.ThreadFactory
Thread factory for creating threads that belong to the specified thread group.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DELIMITER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GroupedThreadFactory
groupedThreadFactory(java.lang.String groupName)
Returns thread factory for producing threads associated with the specified group name.java.lang.Thread
newThread(java.lang.Runnable r)
java.lang.ThreadGroup
threadGroup()
Returns the thread group associated with the factory.java.lang.String
toString()
-
-
-
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:
newThread
in interfacejava.util.concurrent.ThreadFactory
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-