refactoring

pull/3245/merge
Nikita Koksharov 4 years ago
parent f7b5aa8a93
commit d4f4b65af1

@ -1,36 +0,0 @@
/**
* Copyright (c) 2013-2020 Nikita Koksharov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.redisson.client;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.Channel;
/**
*
* @author Nikita Koksharov
*
*/
public class DefaultNettyHook implements NettyHook {
@Override
public void afterBoostrapInitialization(Bootstrap bootstrap) {
}
@Override
public void afterChannelInitialization(Channel channel) {
}
}

@ -32,13 +32,15 @@ public interface NettyHook {
*
* @param bootstrap - Netty Bootstrap object
*/
void afterBoostrapInitialization(Bootstrap bootstrap);
default void afterBoostrapInitialization(Bootstrap bootstrap) {
}
/**
* Invoked when Netty Channel object was created and initialized.
*
* @param channel - Netty Channel object
*/
void afterChannelInitialization(Channel channel);
default void afterChannelInitialization(Channel channel) {
}
}

@ -63,7 +63,7 @@ public class RedisClientConfig {
private String sslTruststorePassword;
private URL sslKeystore;
private String sslKeystorePassword;
private NettyHook nettyHook = new DefaultNettyHook();
private NettyHook nettyHook = new NettyHook() {};
public RedisClientConfig() {
}

@ -16,7 +16,6 @@
package org.redisson.config;
import io.netty.channel.EventLoopGroup;
import org.redisson.client.DefaultNettyHook;
import org.redisson.client.NettyHook;
import org.redisson.client.codec.Codec;
import org.redisson.codec.MarshallingCodec;
@ -85,7 +84,7 @@ public class Config {
private int cleanUpKeysAmount = 100;
private NettyHook nettyHook = new DefaultNettyHook();
private NettyHook nettyHook = new NettyHook() {};
private boolean useThreadClassLoader = true;

Loading…
Cancel
Save