Package org.apache.pulsar.broker.limiter
Class ConnectionController.DefaultConnectionController
java.lang.Object
org.apache.pulsar.broker.limiter.ConnectionController.DefaultConnectionController
- All Implemented Interfaces:
ConnectionController
- Enclosing interface:
- ConnectionController
public static class ConnectionController.DefaultConnectionController
extends Object
implements ConnectionController
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.pulsar.broker.limiter.ConnectionController
ConnectionController.DefaultConnectionController, ConnectionController.State -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddecreaseConnection(SocketAddress remoteAddress) Decrease the number of connections counter.static intincreaseConnection(SocketAddress remoteAddress) Increase the number of connections counter.
-
Constructor Details
-
DefaultConnectionController
public DefaultConnectionController(int maxConnections, int maxConnectionPerIp)
-
-
Method Details
-
increaseConnection
Description copied from interface:ConnectionControllerIncrease the number of connections counter.- Specified by:
increaseConnectionin interfaceConnectionController- Returns:
-
decreaseConnection
Description copied from interface:ConnectionControllerDecrease the number of connections counter.- Specified by:
decreaseConnectionin interfaceConnectionController
-
getTotalConnectionNum
public static int getTotalConnectionNum() -
getConnections
-