Minor, fixed code style
This commit is contained in:
@@ -2,13 +2,14 @@ package io.moquette.broker;
|
||||
|
||||
import io.moquette.spi.impl.subscriptions.Subscription;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
public class MemorySubscriptionsRepository implements ISubscriptionsRepository {
|
||||
|
||||
private final List<Subscription> subscriptions = new LinkedList<>();
|
||||
private final List<Subscription> subscriptions = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public List<Subscription> listAllSubscriptions() {
|
||||
|
||||
@@ -20,7 +20,7 @@ class Session {
|
||||
private static final int FLIGHT_BEFORE_RESEND_MS = 5_000;
|
||||
private static final int INFLIGHT_WINDOW_SIZE = 10;
|
||||
|
||||
class InFlightPacket implements Delayed {
|
||||
static class InFlightPacket implements Delayed {
|
||||
|
||||
final int packetId;
|
||||
private long startTime;
|
||||
|
||||
@@ -49,7 +49,7 @@ public class AutoFlushHandler extends ChannelDuplexHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerAdded(ChannelHandlerContext ctx) {
|
||||
public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
|
||||
if (ctx.channel().isActive() && ctx.channel().isRegistered()) {
|
||||
// channelActive() event has been fired already, which means this.channelActive() will
|
||||
// not be invoked. We have to initialize here instead.
|
||||
@@ -141,10 +141,8 @@ public class AutoFlushHandler extends ChannelDuplexHandler {
|
||||
*
|
||||
* @param ctx
|
||||
* the channel context.
|
||||
* @throws Exception
|
||||
* in case of any IO error.
|
||||
*/
|
||||
protected void channelIdle(ChannelHandlerContext ctx/* , IdleStateEvent evt */) {
|
||||
private void channelIdle(ChannelHandlerContext ctx) {
|
||||
// ctx.fireUserEventTriggered(evt);
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Flushing idle Netty channel {} Cid: {}", ctx.channel(), NettyUtils.clientID(ctx.channel()));
|
||||
|
||||
Reference in New Issue
Block a user