自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

lack的专栏

the quieter you become,the more you are able to hear

  • 博客(218)
  • 资源 (15)
  • 收藏
  • 关注

原创 dubbo扩展http协议后FullGC

问题dubbo内部定制的版本中,在处理大于10K的包的时候,会出现内存溢出的现象原因是我们在定制dubbo http协议的时候,使用了jboss包里面的HttpRequestDecoder的http decoder方法来解析http协议内容该方法在解析非http协议的大内容时,会出现内存溢出的情况某个服务因为这个问题,出现了full gc 的情况复现问题根据描述复现该问题指定dub

2018-02-28 09:14:22 306

原创 dubbo源码—service reply

dubbo通过netty将请求发送到provider的时候,provider之前已经启动好的NettyServer监听指定端口的时候会收到来自consumer的请求,将通过网络发送来的二进制编码成Request交给上层处理。dubbo从Request中取出调用信息,找到之前的Invoker,然后经过filter,最后通过代理调用到提供服务的方法。provider处理请求的调用堆栈如下:sayH

2018-02-28 09:14:19 187

原创 dubbo源码—service invoke

dubbo的远程调用过程是怎么样的?dubbo远程过程调用经过了那些处理?发起远程调用的时候究竟传了什么数据给provider?要解决这些问题,欢迎一起探讨走进dubbo源码栏目。在service reference中说了consumer端发起调用的时候使用的是远程服务的本地代理,发起调用的堆栈是(上面调用堆栈中的filter链先不介绍了,留在后面service reply中介绍,因为

2018-02-28 09:14:16 1300 1

原创 dubbo源码—service reference

service reference在编写好服务之后,dubbo会将服务export出去,这个时候就可以编写consumer来调用这个服务了。dubbo作为一个rpc框架,使用者使用远程服务和使用本地服务是类似的,不用关心远程服务在哪里,怎么引用的,因为dubbo包含了自动发现和引用服务的功能。dubbo引用服务主要工作:创建proxy和Invoker(DubboInvoker里面会启动Ne

2018-02-28 09:14:13 320

原创 dubbo源码—service export

在应用编写好服务并进行之后,dubbo负责将服务export出去,dubbo export服务的时候主要做了以下几件事:将服务export到本地(根据scope的配置)创建Invoker(启动本地NettyServer,监听指定端口,等待请求)注册provider的信息到registry,供consumer发现并订阅服务订阅registry中的configurator节点,可以动态更改部

2018-02-28 09:14:11 763

原创 dubbo源码—SPI

Java中的SPISPI,Service Provider Interface,java中提供的一种使程序可扩展的方式,系统定义好接口规范,供其他服务提供方实现,服务提供方将自己jar包META-INF/services下新建一个以接口全名称定义的文件,里面内容写上自己服务的实现的类名,每一行代表一个实现,服务使用方可以通过ServiceLoader.load加载所有的服务,然后判断可以使用的服

2018-02-28 09:14:08 195

原创 dubbo源码—dubbo自定义spring xml标签

dubbo为了和spring更好的集成,提供了一些xml配置标签,也就是自定义标签spring自定义标签spring自定义标签的方式如下:设计配置属性和JavaBean编写xsd文件,校验xml属性和便于编辑器提示编写NamespaceHandler和BeanDefinitionParser解析xml对应的标签编写spring.handlers和spring.schemas串联起所有

2018-02-28 09:14:05 195

原创 dubbo源码—dubbo简介

dubbo是一个RPC框架,应用方像使用本地service一样使用dubbo service。dubbo体系架构上图中的角色:最重要的是consumer、registry和providerconsumer:服务调用者provider:服务提供者registry:供provider注册服务和consumer发现服务monitor:监控调用过程的一些参数,比如:调用次数countcon

2018-02-28 09:14:02 318

原创 leetcode — reorder-list

/** * Source : https://oj.leetcode.com/problems/reorder-list/ * * Given a singly linked list L: L0→L1→…→Ln-1→Ln, * reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… * * You must do this in-place without al

2018-02-28 09:13:59 150

原创 leetcode — linked-list-cycle

/** * Source : https://oj.leetcode.com/problems/linked-list-cycle/ * * Given a linked list, determine if it has a cycle in it. * * Follow up: * Can you solve it without using extra space? */pu

2018-02-28 09:13:57 180

原创 leetcode — linked-list-cycle-ii

/** * Source : https://oj.leetcode.com/problems/linked-list-cycle-ii/ * * Given a linked list, return the node where the cycle begins. If there is no cycle, return null. * * Follow up: * Can you

2018-02-28 09:13:54 156

原创 leetcode — word-break-ii

import java.util.*;/** * Source : https://oj.leetcode.com/problems/word-break-ii/ * * Given a string s and a dictionary of words dict, add spaces in s to construct a sentence * where each word i

2018-02-28 09:13:52 138

原创 leetcode — word-break

import java.util.Arrays;import java.util.HashSet;import java.util.Set;/** * Source : https://oj.leetcode.com/problems/word-break/ * * * Given a string s and a dictionary of words dict, determi

2018-02-28 09:13:49 136

原创 leetcode — copy-list-with-random-pointer

import java.util.*;/** * * Source : https://oj.leetcode.com/problems/copy-list-with-random-pointer/ * * A linked list is given such that each node contains an additional random pointer * which

2018-02-28 09:13:46 108

原创 leetcode — single-number-ii

/** * Source : https://oj.leetcode.com/problems/single-number-ii/ * * Given an array of integers, every element appears three times except for one. Find that single one. * * Note: * Your algorit

2018-02-28 09:13:43 228

原创 leetcode — single-number

/** * Source : https://oj.leetcode.com/problems/single-number/ * * * Given an array of integers, every element appears twice except for one. Find that single one. * * Note: * Your algorithm sho

2018-02-28 09:13:41 84

原创 leetcode — candy

/** * Source : https://oj.leetcode.com/problems/candy/ * * There are N children standing in a line. Each child is assigned a rating value. * * You are giving candies to these children subjected t

2018-02-28 09:13:38 100

原创 leetcode — gas-station

/** * Source : https://oj.leetcode.com/problems/gas-station/ * * There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. * * You have a car with an unlimi

2018-02-28 09:13:35 167

原创 leetcode — clone-graph

import java.util.*;/** * Source : https://oj.leetcode.com/problems/clone-graph/ * * * Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. * * OJ's u

2018-02-28 09:13:33 132

原创 leetcode — palindrome-partitioning

import java.util.ArrayList;import java.util.Arrays;import java.util.List;/** * Source : https://oj.leetcode.com/problems/palindrome-partitioning/ * * * Given a string s, partition s such that

2018-02-28 09:13:30 176

原创 leetcode — palindrome-partitioning-ii

import java.util.Arrays;/** * * Source : https://oj.leetcode.com/problems/palindrome-partitioning-ii/ * * Given a string s, partition s such that every substring of the partition is a palindrome

2018-02-28 09:13:27 135

原创 leetcode — surrounded-regions

import java.util.Arrays;import java.util.Stack;/** * Source : https://oj.leetcode.com/problems/surrounded-regions/ * * * Given a 2D board containing 'X' and 'O', capture all regions surrounded

2018-02-28 09:13:24 112

原创 leetcode — sum-root-to-leaf-numbers

import java.util.Stack;/** * * Source : https://oj.leetcode.com/problems/sum-root-to-leaf-numbers/ * * * Given a binary tree containing digits from 0-9 only, each root-to-leaf path could repres

2018-02-28 09:13:22 112

原创 leetcode — longest-consecutive-sequence

import java.util.HashSet;import java.util.Set;/** * Source : https://oj.leetcode.com/problems/longest-consecutive-sequence/ * * * Given an unsorted array of integers, find the length of the lon

2018-02-28 09:13:19 175

原创 leetcode — word-ladder-ii

import java.util.*;/** * Source : https://oj.leetcode.com/problems/word-ladder-ii/ * * * Given two words (start and end), and a dictionary, find all shortest transformation * sequence(s) from s

2018-02-28 09:13:16 147

原创 leetcode — word-ladder

import java.util.*;/** * Source : https://oj.leetcode.com/problems/word-ladder/ * * * Given two words (start and end), and a dictionary, find the length of shortest * transformation sequence fr

2018-02-28 09:13:13 130

原创 leetcode — valid-palindrome

/** * Source : https://oj.leetcode.com/problems/valid-palindrome/ * * * Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. * * For exam

2018-02-28 09:13:10 124

原创 leetcode — binary-tree-maximum-path-sum

/** * * Source : https://oj.leetcode.com/problems/binary-tree-maximum-path-sum/ * * * Given a binary tree, find the maximum path sum. * * The path may start and end at any node in the tree. *

2018-02-28 09:13:08 131

原创 leetcode — best-time-to-buy-and-sell-stock-iii

/** * Source : https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/ * * * Say you have an array for which the ith element is the price of a given stock on day i. * * Design an a

2018-02-28 09:13:05 219

原创 leetcode — best-time-to-buy-and-sell-stock-ii

/** * Source : https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/ * * * * Say you have an array for which the ith element is the price of a given stock on day i. * * Design an

2018-02-28 09:13:03 154

原创 leetcode — triangle

/** * Source : https://oj.leetcode.com/problems/triangle/ * * * Given a triangle, find the minimum path sum from top to bottom. * Each step you may move to adjacent numbers on the row below. *

2018-02-28 09:13:00 153

原创 leetcode — best-time-to-buy-and-sell-stock

/** * Source : https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock/ * * * Say you have an array for which the ith element is the price of a given stock on day i. * * If you were onl

2018-02-28 09:12:57 97

原创 leetcode — pascals-triangle-ii

import java.util.Arrays;/** * * Source : https://oj.leetcode.com/problems/pascals-triangle-ii/ * * * Given an index k, return the kth row of the Pascal's triangle. * * For example, given k =

2018-02-28 09:12:54 139

原创 leetcode — pascals-triangle

import java.util.ArrayList;import java.util.Arrays;import java.util.List;/** * Source : https://oj.leetcode.com/problems/pascals-triangle/ * * * Given numRows, generate the first numRows of Pa

2018-02-28 09:12:52 116

原创 leetcode — populating-next-right-pointers-in-each-node

/** * * Source : https://oj.leetcode.com/problems/populating-next-right-pointers-in-each-node/ * Source : https://oj.leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/ * * *

2018-02-28 09:12:49 101

原创 leetcode — distinct-subsequences

import java.util.Arrays;/** * * Source : https://oj.leetcode.com/problems/distinct-subsequences/ * * * Given a string S and a string T, count the number of distinct subsequences of T in S. *

2018-02-28 09:12:46 136

原创 leetcode — flatten-binary-tree-to-linked-list

import java.util.ArrayList;import java.util.Arrays;import java.util.List;/** * Source : https://oj.leetcode.com/problems/flatten-binary-tree-to-linked-list/ * * * Given a binary tree, flatten

2018-02-28 09:12:44 125

原创 leetcode — path-sum-ii

import java.util.ArrayList;import java.util.Arrays;import java.util.List;/** * Source : https://oj.leetcode.com/problems/path-sum-ii/ * * * Given a binary tree and a sum, find all root-to-leaf

2018-02-28 09:12:41 222

原创 leetcode — path-sum

/** * Source : https://oj.leetcode.com/problems/path-sum/ * * * Given a binary tree and a sum, determine if the tree has a root-to-leaf path * such that adding up all the values along the path eq

2018-02-28 09:12:38 103

原创 leetcode — minimum-depth-of-binary-tree

/** * Source : https://oj.leetcode.com/problems/minimum-depth-of-binary-tree/ * * * Given a binary tree, find its minimum depth. * * The minimum depth is the number of nodes along the shortest p

2018-02-28 09:12:35 119

Hibernate 的第一个例子

学习HIbernate的第一个例子,便于初学者入门

2016-03-16

Win32 API大全.chm

进行win32开发需要参看的一些API函数,可以快速查找相关函数

2014-05-22

C语言函数库大全.chm

包含C语言大部分库函数,最重要的是里面还有例子哦

2014-05-22

java API

java API chm方便阅读,中文文档,为初学者

2014-03-19

JAVAScript教程

学习网站制作,想让自己的网页更加丰富多彩,一定要学习JAVAScript教程

2013-04-17

API命名规则

复杂的windowsAPI如何命名,找到其中规律有助于你进一步运用API进行编程

2013-04-17

74h573中文资料

锁存器,用来扩展单片机i/o口,并控制输出

2013-03-28

viual c++游戏

c++游戏编程,适合想进一步学习c++的同胞,一些简单的代码,很好

2013-03-26

proe5.0 破解文件

proe5.0 32位破解文件,proe64位野火版,破解神器

2013-03-26

.NET+2003窗口程序设计

相信当您学会这些工具后,将可提升您开发窗口程序的速度与品质。

2013-01-03

dotNetFx40_Full_x86.exe

与vs2008一起使用,有些电脑需要安装此软件才能运行

2013-01-03

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除