Package io.lettuce.core.resource
Interface EventLoopResources
-
public interface EventLoopResources
Interface to encapsulate EventLoopGroup resources.- Since:
- 6.0
- Author:
- Mark Paluch, Yohei Ueki
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Class<? extends DatagramChannel>
datagramChannelClass()
Class<? extends Channel>
domainSocketChannelClass()
Class<? extends EventLoopGroup>
eventLoopGroupClass()
boolean
matches(Class<? extends EventExecutorGroup> type)
Checks if the giventype
matches the underlyingEventExecutorGroup
type.EventLoopGroup
newEventLoopGroup(int nThreads, ThreadFactory threadFactory)
Create a newEpollEventLoopGroup
.SocketAddress
newSocketAddress(String socketPath)
Class<? extends Channel>
socketChannelClass()
-
-
-
Method Detail
-
matches
boolean matches(Class<? extends EventExecutorGroup> type)
Checks if the giventype
matches the underlyingEventExecutorGroup
type.- Parameters:
type
- must not benull
.- Returns:
true
iftype
is aEventExecutorGroup
of the underlying loop resources.
-
eventLoopGroupClass
Class<? extends EventLoopGroup> eventLoopGroupClass()
- Returns:
- the
EventLoopGroup
class.
-
newEventLoopGroup
EventLoopGroup newEventLoopGroup(int nThreads, ThreadFactory threadFactory)
Create a newEpollEventLoopGroup
.- Parameters:
nThreads
- number of threads.threadFactory
- theThreadFactory
.- Returns:
- the
EventLoopGroup
.
-
domainSocketChannelClass
Class<? extends Channel> domainSocketChannelClass()
- Returns:
- the Domain Socket
Channel
class.
-
datagramChannelClass
Class<? extends DatagramChannel> datagramChannelClass()
- Returns:
- the
DatagramChannel
class. - Since:
- 6.1
-
newSocketAddress
SocketAddress newSocketAddress(String socketPath)
- Parameters:
socketPath
- the socket file path.- Returns:
- a domain socket address object.
-
-