11215f50d128b6ff27d9dfae6a15aceff2337bcb
Files Diff
- Added: 25
- Removed: 27
- Renamed: 0
- Modified: 130
Refactorings reported:
| Refactoring Name | Occurences | ||
|---|---|---|---|
| Change Parameter Type | 4 | ||
| Change Parameter Type requestInfo : RequestInfo to context : RequestContext in method public request(context RequestContext) : void in class com.mpush.netty.http.HttpClient | From | To | |
| Change Parameter Type event : Object to event : Event in method public post(event Event) : void in class com.mpush.tools.event.EventBus | From | To | |
| Change Parameter Type info : RequestInfo to context : RequestContext in method private writeRequest(channel Channel, context RequestContext) : void in class com.mpush.netty.http.NettyHttpClient | From | To | |
| Change Parameter Type info : RequestInfo to context : RequestContext in method public request(context RequestContext) : void in class com.mpush.netty.http.NettyHttpClient | From | To | |
| Move Method | 2 | ||
| Move Method private tryAcquire(host String) : Channel from class com.mpush.netty.http.NettyHttpClient to public tryAcquire(host String) : Channel from class com.mpush.netty.http.HttpConnectionPool | From | To | |
| Move Method private tryRelease(channel Channel) : void from class com.mpush.netty.http.NettyHttpClient to public tryRelease(channel Channel) : void from class com.mpush.netty.http.HttpConnectionPool | From | To | |
| Move Attribute | 3 | ||
| Move Attribute private maxConnPerHost : int from class com.mpush.netty.http.NettyHttpClient to private maxConnPerHost : int from class com.mpush.netty.http.HttpConnectionPool | From | To | |
| Move Attribute private hostKey : AttributeKey<String> from class com.mpush.netty.http.NettyHttpClient to private hostKey : AttributeKey<String> from class com.mpush.netty.http.HttpConnectionPool | From | To | |
| Move Attribute private channelPool : ArrayListMultimap<String,Channel> from class com.mpush.netty.http.NettyHttpClient to private channelPool : ArrayListMultimap<String,Channel> from class com.mpush.netty.http.HttpConnectionPool | From | To | |
| Extract Class | 1 | ||
| Extract Class com.mpush.netty.http.HttpConnectionPool from class com.mpush.netty.http.NettyHttpClient | From | To | |
| Rename Class | 2 | ||
| Rename Class com.mpush.tools.MPushUtil renamed to com.mpush.tools.Utils | From | To | |
| Rename Class com.mpush.netty.http.RequestInfo renamed to com.mpush.netty.http.RequestContext | From | To | |
| Move And Rename Class | 1 | ||
| Move And Rename Class com.mpush.api.exception.SendMessageException moved and renamed to com.mpush.client.push.PushRequest.Status | From | To | |
| Move Class | 15 | ||
| Move Class com.mpush.tools.GenericsUtil moved to com.mpush.tools.common.GenericsUtil | From | To | |
| Move Class com.mpush.api.Server moved to com.mpush.api.service.Server | From | To | |
| Move Class com.mpush.api.Service.Listener moved to com.mpush.api.service.Listener | From | To | |
| Move Class com.mpush.tools.exception.ZKException moved to com.mpush.zk.ZKException | From | To | |
| Move Class com.mpush.tools.Profiler moved to com.mpush.tools.common.Profiler | From | To | |
| Move Class com.mpush.tools.JVMUtil moved to com.mpush.tools.common.JVMUtil | From | To | |
| Move Class com.mpush.api.Service moved to com.mpush.api.service.Service | From | To | |
| Move Class com.mpush.api.exception.DecodeException moved to com.mpush.netty.codec.DecodeException | From | To | |
| Move Class com.mpush.tools.IOUtils moved to com.mpush.tools.common.IOUtils | From | To | |
| Move Class com.mpush.api.Client moved to com.mpush.api.service.Client | From | To | |
| Move Class com.mpush.api.exception.BootException moved to com.mpush.bootstrap.BootException | From | To | |
| Move Class com.mpush.api.BaseService moved to com.mpush.api.service.BaseService | From | To | |
| Move Class com.mpush.tools.Strings moved to com.mpush.tools.common.Strings | From | To | |
| Move Class com.mpush.api.exception.CryptoException moved to com.mpush.tools.crypto.CryptoException | From | To | |
| Move Class com.mpush.tools.Pair moved to com.mpush.tools.common.Pair | From | To | |
| Change Variable Type | 3 | ||
| Change Variable Type uri : URI to uri : URL in method private doDnsMapping(url String) : String in class com.mpush.core.handler.HttpProxyHandler | From | To | |
| Change Variable Type channel : Channel to pool : HttpConnectionPool in method protected doStop(listener Listener) : void in class com.mpush.netty.http.NettyHttpClient | From | To | |
| Change Variable Type info : RequestInfo to info : RequestContext in method public operationComplete(future ChannelFuture) : void in class com.mpush.netty.http.NettyHttpClient.writeRequest.addListener | From | To | |
| Split Parameter | 1 | ||
| Split Parameter node : ZKServerNode to [port : int, host : String] in method private addClient(host String, port int) : void in class com.mpush.client.gateway.GatewayClientFactory | From | To | |
| Split Attribute | 1 | ||
| Split Attribute context : ThreadPoolConfig to [poolConfig : ThreadPoolConfig, DUMP_DIR : String] in class com.mpush.tools.thread.pool.DumpThreadRejectedHandler | From | To | |
| Extract Method | 3 | ||
| Extract Method public encrypt(data byte[], zeroIv IvParameterSpec, keySpec SecretKeySpec) : byte[] extracted from public encrypt(data byte[], encryptKey byte[], iv byte[]) : byte[] in class com.mpush.tools.crypto.AESUtils | From | To | |
| Extract Method public decrypt(data byte[], zeroIv IvParameterSpec, keySpec SecretKeySpec) : byte[] extracted from public decrypt(data byte[], decryptKey byte[], iv byte[]) : byte[] in class com.mpush.tools.crypto.AESUtils | From | To | |
| Extract Method private parseTimeout() : int extracted from public RequestInfo(request FullHttpRequest, callback HttpCallback) in class com.mpush.netty.http.RequestContext | From | To | |
| Rename Method | 15 | ||
| Rename Method public stop(listener Listener) : void renamed to protected doStop(listener Listener) : void in class com.mpush.netty.client.NettyClient | From | To | |
| Rename Method public translate(origin String) : DnsMapping renamed to public lookup(origin String) : DnsMapping in class com.mpush.common.net.DnsMappingManager | From | To | |
| Rename Method package onUserOnline(event UserOnlineEvent) : void renamed to package on(event UserOnlineEvent) : void in class com.mpush.core.router.UserOnlineOfflineListener | From | To | |
| Rename Method public start(listener Listener) : void renamed to protected doStart(listener Listener) : void in class com.mpush.monitor.service.MonitorService | From | To | |
| Rename Method package onHandshakeOk(event HandshakeEvent) : void renamed to package on(event HandshakeEvent) : void in class com.mpush.core.server.ServerConnectionManager | From | To | |
| Rename Method public remove(channel Channel) : void renamed to public removeAndClose(channel Channel) : Connection in class com.mpush.core.server.ServerConnectionManager | From | To | |
| Rename Method public uncompress(data byte[]) : byte[] renamed to public decompress(data byte[]) : byte[] in class com.mpush.tools.common.IOUtils | From | To | |
| Rename Method public stop() : void renamed to protected doStop(listener Listener) : void in class com.mpush.netty.http.NettyHttpClient | From | To | |
| Rename Method package onConnectionCloseEvent(event ConnectionCloseEvent) : void renamed to package on(event ConnectionCloseEvent) : void in class com.mpush.core.router.LocalRouterManager | From | To | |
| Rename Method public remove(sessionId int) : PushRequest renamed to public getAndRemove(sessionId int) : PushRequest in class com.mpush.client.push.PushRequestBus | From | To | |
| Rename Method package onUserOffline(event UserOfflineEvent) : void renamed to package on(event UserOfflineEvent) : void in class com.mpush.core.router.UserOnlineOfflineListener | From | To | |
| Rename Method public start() : void renamed to protected doStart(listener Listener) : void in class com.mpush.netty.http.NettyHttpClient | From | To | |
| Rename Method public start() : void renamed to public run() : void in class com.mpush.test.client.ConnectClientBoot | From | To | |
| Rename Method package onRouteChange(event RouterChangeEvent) : void renamed to package on(event RouterChangeEvent) : void in class com.mpush.core.router.RouterChangeListener | From | To | |
| Rename Method public remove(channel Channel) : void renamed to public removeAndClose(channel Channel) : Connection in class com.mpush.api.connection.ConnectionManager | From | To | |
| Rename Variable | 1 | ||
| Rename Variable startConnectChannel : long to startCreate : long in method public request(context RequestContext) : void in class com.mpush.netty.http.NettyHttpClient | From | To | |
| Change Return Type | 5 | ||
| Change Return Type void to Connection in method public removeAndClose(channel Channel) : Connection in class com.mpush.core.server.ServerConnectionManager | From | To | |
| Change Return Type void to Connection in method public removeAndClose(channel Channel) : Connection in class com.mpush.api.connection.ConnectionManager | From | To | |
| Change Return Type void to Future<Boolean> in method public stop() : Future<Boolean> in class com.mpush.api.service.BaseService | From | To | |
| Change Return Type void to Future<Boolean> in method public start() : Future<Boolean> in class com.mpush.api.service.BaseService | From | To | |
| Change Return Type void to Future<?> in method public put(sessionId int, request PushRequest) : Future<?> in class com.mpush.client.push.PushRequestBus | From | To | |
| Parameterize Variable | 2 | ||
| Parameterize Variable key : SecretKeySpec to keySpec : SecretKeySpec in method public encrypt(data byte[], zeroIv IvParameterSpec, keySpec SecretKeySpec) : byte[] in class com.mpush.tools.crypto.AESUtils | From | To | |
| Parameterize Variable key : SecretKeySpec to keySpec : SecretKeySpec in method public decrypt(data byte[], zeroIv IvParameterSpec, keySpec SecretKeySpec) : byte[] in class com.mpush.tools.crypto.AESUtils | From | To | |
| Replace Variable With Attribute | 2 | ||
| Replace Variable With Attribute decryptKey : byte[] to key : byte[] in method public decrypt(data byte[], zeroIv IvParameterSpec, keySpec SecretKeySpec) : byte[] in class com.mpush.tools.crypto.AESUtils | From | To | |
| Replace Variable With Attribute channel : Channel to pool : HttpConnectionPool in method protected doStop(listener Listener) : void in class com.mpush.netty.http.NettyHttpClient | From | To | |
| Rename Attribute | 6 | ||
| Rename Attribute NETTY_WORKER : String to T_SERVER_WORKER : String in class com.mpush.tools.thread.ThreadNames | From | To | |
| Rename Attribute requests : Map<Integer,PushRequest> to reqQueue : Map<Integer,PushRequest> in class com.mpush.client.push.PushRequestBus | From | To | |
| Rename Attribute logInited : boolean to logInit : boolean in class com.mpush.tools.log.Logs | From | To | |
| Rename Attribute expiredTimes : int to timeoutTimes : int in class com.mpush.core.server.ServerConnectionManager.HeartbeatCheckTask | From | To | |
| Rename Attribute NETTY_BOSS : String to T_SERVER_BOSS : String in class com.mpush.tools.thread.ThreadNames | From | To | |
| Rename Attribute proxy_enable : boolean to proxy_enabled : boolean in class com.mpush.tools.config.CC.mp.http | From | To | |
| Change Attribute Type | 3 | ||
| Change Attribute Type numTestsPerEvictionRun : long to numTestsPerEvictionRun : int in class com.mpush.tools.config.CC.mp.redis.config | From | To | |
| Change Attribute Type requestKey : AttributeKey<RequestInfo> to requestKey : AttributeKey<RequestContext> in class com.mpush.netty.http.NettyHttpClient | From | To | |
| Change Attribute Type status : AtomicInteger to status : AtomicReference<Status> in class com.mpush.client.push.PushRequest | From | To | |
| Extract And Move Method | 1 | ||
| Extract And Move Method public setRejectedPolicy(rejectedPolicy int) : ThreadPoolConfig extracted from public get(name String) : Executor in class com.mpush.tools.thread.pool.DefaultThreadPoolFactory & moved to class com.mpush.tools.thread.pool.ThreadPoolConfig | From | To | |
| Rename Parameter | 5 | ||
| Rename Parameter info : RequestInfo to context : RequestContext in method public request(context RequestContext) : void in class com.mpush.netty.http.NettyHttpClient | From | To | |
| Rename Parameter requestInfo : RequestInfo to context : RequestContext in method public request(context RequestContext) : void in class com.mpush.netty.http.HttpClient | From | To | |
| Rename Parameter context : ThreadPoolConfig to poolConfig : ThreadPoolConfig in method public DumpThreadRejectedHandler(poolConfig ThreadPoolConfig) in class com.mpush.tools.thread.pool.DumpThreadRejectedHandler | From | To | |
| Rename Parameter executor : ThreadPoolExecutor to e : ThreadPoolExecutor in method public rejectedExecution(r Runnable, e ThreadPoolExecutor) : void in class com.mpush.tools.thread.pool.DumpThreadRejectedHandler | From | To | |
| Rename Parameter info : RequestInfo to context : RequestContext in method private writeRequest(channel Channel, context RequestContext) : void in class com.mpush.netty.http.NettyHttpClient | From | To |