Chain of Responsibility
为了实现各种服务器的代码结构的高度统一,不同角色的server对应不同的processor chain
|
|
LeaderZooKeeperServer.java
FollowerZooKeeperServer.java
ZooKeeperServer.java1234567func processPacket() { submitRequest()}func submitRequest(req) { firstProcessor.processRequest(req)}