Class NettyTransport
- java.lang.Object
-
- org.infinispan.server.core.transport.NettyTransport
-
-
Constructor Summary
Constructors Constructor Description NettyTransport(InetSocketAddress address, ProtocolServerConfiguration configuration, String threadNamePrefix, EmbeddedCacheManager cacheManager)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static io.netty.channel.MultithreadEventLoopGroup
buildEventLoop(int nThreads, ThreadFactory threadFactory, String configuration)
CompletionStage<Void>
closeChannels(io.netty.channel.group.ChannelMatcher channelMatcher)
String
getHostName()
int
getIdleTimeout()
int
getNumberIOThreads()
int
getNumberOfGlobalConnections()
int
getNumberOfLocalConnections()
int
getPendingTasks()
int
getPort()
int
getReceiveBufferSize()
int
getSendBufferSize()
boolean
getTcpNoDelay()
long
getTotalBytesRead()
long
getTotalBytesWritten()
void
initializeHandler(io.netty.channel.ChannelInitializer<io.netty.channel.Channel> handler)
boolean
isRunning()
void
start()
void
stop()
void
updateTotalBytesRead(int bytes)
void
updateTotalBytesWritten(int bytes)
-
-
-
Constructor Detail
-
NettyTransport
public NettyTransport(InetSocketAddress address, ProtocolServerConfiguration configuration, String threadNamePrefix, EmbeddedCacheManager cacheManager)
-
-
Method Detail
-
initializeHandler
public void initializeHandler(io.netty.channel.ChannelInitializer<io.netty.channel.Channel> handler)
-
start
@ManagedOperation(description="Starts the transport", displayName="Starts the transport", name="start") public void start()
-
stop
@ManagedOperation(description="Stops the transport", displayName="Stops the transport", name="stop") public void stop()
-
isRunning
@ManagedAttribute(description="Returns whether the transport is running", displayName="Transport running", dataType=TRAIT) public boolean isRunning()
-
getTotalBytesWritten
@ManagedAttribute(description="Returns the total number of bytes written by the server back to clients which includes both protocol and user information.", displayName="Number of total number of bytes written", measurementType=TRENDSUP) public long getTotalBytesWritten()
- Specified by:
getTotalBytesWritten
in interfaceTransport
-
getTotalBytesRead
@ManagedAttribute(description="Returns the total number of bytes read by the server from clients which includes both protocol and user information.", displayName="Number of total number of bytes read", measurementType=TRENDSUP) public long getTotalBytesRead()
- Specified by:
getTotalBytesRead
in interfaceTransport
-
getHostName
@ManagedAttribute(description="Returns the host to which the transport binds.", displayName="Host name", dataType=TRAIT) public String getHostName()
- Specified by:
getHostName
in interfaceTransport
-
getPort
@ManagedAttribute(description="Returns the port to which the transport binds.", displayName="Port", dataType=TRAIT) public int getPort()
-
getNumberIOThreads
@ManagedAttribute(description="Returns the number of I/O threads.", displayName="Number of I/O threads") public int getNumberIOThreads()
- Specified by:
getNumberIOThreads
in interfaceTransport
-
getPendingTasks
@ManagedAttribute(description="Returns the number of pending tasks.", displayName="Pending tasks") public int getPendingTasks()
- Specified by:
getPendingTasks
in interfaceTransport
-
getIdleTimeout
@ManagedAttribute(description="Returns the idle timeout.", displayName="Idle timeout", dataType=TRAIT) public int getIdleTimeout()
- Specified by:
getIdleTimeout
in interfaceTransport
-
getTcpNoDelay
@ManagedAttribute(description="Returns whether TCP no delay was configured or not.", displayName="TCP no delay", dataType=TRAIT) public boolean getTcpNoDelay()
- Specified by:
getTcpNoDelay
in interfaceTransport
-
getSendBufferSize
@ManagedAttribute(description="Returns the send buffer size.", displayName="Send buffer size", dataType=TRAIT) public int getSendBufferSize()
- Specified by:
getSendBufferSize
in interfaceTransport
-
getReceiveBufferSize
@ManagedAttribute(description="Returns the receive buffer size.", displayName="Receive buffer size", dataType=TRAIT) public int getReceiveBufferSize()
- Specified by:
getReceiveBufferSize
in interfaceTransport
-
getNumberOfLocalConnections
@ManagedAttribute(description="Returns a count of active connections this server.", displayName="Local active connections") public int getNumberOfLocalConnections()
- Specified by:
getNumberOfLocalConnections
in interfaceTransport
-
getNumberOfGlobalConnections
@ManagedAttribute(description="Returns a count of active connections in the cluster. This operation will make remote calls to aggregate results, so latency might have an impact on the speed of calculation of this attribute.", displayName="Cluster-wide number of active connections") public int getNumberOfGlobalConnections()
- Specified by:
getNumberOfGlobalConnections
in interfaceTransport
-
updateTotalBytesWritten
public void updateTotalBytesWritten(int bytes)
-
updateTotalBytesRead
public void updateTotalBytesRead(int bytes)
-
closeChannels
public CompletionStage<Void> closeChannels(io.netty.channel.group.ChannelMatcher channelMatcher)
- Specified by:
closeChannels
in interfaceTransport
-
buildEventLoop
public static io.netty.channel.MultithreadEventLoopGroup buildEventLoop(int nThreads, ThreadFactory threadFactory, String configuration)
-
-