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.EventLoopGroupType
eventLoopGroupType
private java.lang.String
name
private int
numEventLoops
-
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 void
close(io.netty.channel.EventLoopGroup instance)
Destroy the given instance.io.netty.channel.EventLoopGroup
create()
Create a new instance of the resource.java.lang.String
toString()
-
-
-
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.Resource
Create a new instance of the resource.- Specified by:
create
in interfaceSharedResourceHolder.Resource<io.netty.channel.EventLoopGroup>
-
close
public void close(io.netty.channel.EventLoopGroup instance)
Description copied from interface:SharedResourceHolder.Resource
Destroy the given instance.- Specified by:
close
in interfaceSharedResourceHolder.Resource<io.netty.channel.EventLoopGroup>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-