Package org.onlab.util
Class GroupedThreadFactory
- java.lang.Object
-
- org.onlab.util.GroupedThreadFactory
-
- All Implemented Interfaces:
ThreadFactory
public final class GroupedThreadFactory extends Object implements ThreadFactory
Thread factory for creating threads that belong to the specified thread group.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GroupedThreadFactory
groupedThreadFactory(String groupName)
Returns thread factory for producing threads associated with the specified group name.Thread
newThread(Runnable r)
ThreadGroup
threadGroup()
Returns the thread group associated with the factory.String
toString()
-
-
-
Field Detail
-
DELIMITER
public static final String DELIMITER
- See Also:
- Constant Field Values
-
-
Method Detail
-
groupedThreadFactory
public static GroupedThreadFactory groupedThreadFactory(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 ThreadGroup threadGroup()
Returns the thread group associated with the factory.- Returns:
- thread group
-
newThread
public Thread newThread(Runnable r)
- Specified by:
newThread
in interfaceThreadFactory
-
-