Package io.grpc.netty
Class Utils.DefaultEventLoopGroupResource
- java.lang.Object
-
- io.grpc.netty.Utils.DefaultEventLoopGroupResource
-
- All Implemented Interfaces:
SharedResourceHolder.Resource<io.netty.channel.EventLoopGroup>
- Enclosing class:
- Utils
private static final class Utils.DefaultEventLoopGroupResource extends java.lang.Object implements SharedResourceHolder.Resource<io.netty.channel.EventLoopGroup>
-
-
Field Summary
Fields Modifier and Type Field Description private Utils.EventLoopGroupTypeeventLoopGroupTypeprivate java.lang.Stringnameprivate intnumEventLoops
-
Constructor Summary
Constructors Constructor Description DefaultEventLoopGroupResource(int numEventLoops, java.lang.String name, Utils.EventLoopGroupType eventLoopGroupType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose(io.netty.channel.EventLoopGroup instance)Destroy the given instance.io.netty.channel.EventLoopGroupcreate()Create a new instance of the resource.java.lang.StringtoString()
-
-
-
Field Detail
-
name
private final java.lang.String name
-
numEventLoops
private final int numEventLoops
-
eventLoopGroupType
private final Utils.EventLoopGroupType eventLoopGroupType
-
-
Constructor Detail
-
DefaultEventLoopGroupResource
DefaultEventLoopGroupResource(int numEventLoops, java.lang.String name, Utils.EventLoopGroupType eventLoopGroupType)
-
-
Method Detail
-
create
public io.netty.channel.EventLoopGroup create()
Description copied from interface:SharedResourceHolder.ResourceCreate a new instance of the resource.- Specified by:
createin interfaceSharedResourceHolder.Resource<io.netty.channel.EventLoopGroup>
-
close
public void close(io.netty.channel.EventLoopGroup instance)
Description copied from interface:SharedResourceHolder.ResourceDestroy the given instance.- Specified by:
closein interfaceSharedResourceHolder.Resource<io.netty.channel.EventLoopGroup>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-