Skip to content

Commit 0e3c9ba

Browse files
committed
update version
1 parent 5a76206 commit 0e3c9ba

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

ikasoa-zk/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ pom.xml
2727
<dependency>
2828
<groupId>com.ikasoa</groupId>
2929
<artifactId>ikasoa-zk</artifactId>
30-
<version>0.1</version>
30+
<version>0.1.1-BETA</version>
3131
</dependency>
3232
......
3333
```
3434

3535
Gradle
3636

3737
```
38-
compile group: 'com.ikasoa', name: 'ikasoa-zk', version: '0.1'
38+
compile group: 'com.ikasoa', name: 'ikasoa-zk', version: '0.1.1-BETA'
3939
```
4040

4141
## 使用示例 ##

ikasoa-zk/src/main/java/com/ikasoa/zk/ZkBase.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.ikasoa.zk;
22

3-
import java.util.ArrayList;
43
import java.util.List;
54

65
import org.I0Itec.zkclient.IZkChildListener;
@@ -64,7 +63,7 @@ public void handleDataDeleted(String nodePath) throws Exception {
6463

6564
@Override
6665
public void handleNewSession() throws Exception {
67-
log.debug("handleNewSession");
66+
log.debug("Implementing 'handleNewSession' .");
6867
nodeList = getChildren();
6968
}
7069

@@ -75,7 +74,7 @@ public void handleSessionEstablishmentError(Throwable t) throws Exception {
7574

7675
@Override
7776
public void handleStateChanged(KeeperState state) throws Exception {
78-
log.debug("handleStateChanged (state : {})", state);
77+
log.debug("Implementing 'handleStateChanged (state : {})' .", state);
7978
}
8079

8180
});
@@ -84,7 +83,8 @@ public void handleStateChanged(KeeperState state) throws Exception {
8483

8584
@Override
8685
public void handleChildChange(String parentPath, List<String> currentChildList) throws Exception {
87-
log.debug("handleChildChange (parentPath : {}, currentChildList : {})", parentPath, currentChildList);
86+
log.debug("Implementing 'handleChildChange (parentPath : {}, currentChildList : {})' .", parentPath,
87+
currentChildList);
8888
nodeList = currentChildList;
8989
}
9090

@@ -96,8 +96,7 @@ public List<ServerInfo> getServerInfoList() {
9696
List<ServerInfo> serverInfoList = ListUtil.newArrayList();
9797
List<String> nList = zkClient.getChildren(zkNode);
9898
for (String n : nList) {
99-
ZkServerNode zksn = (ZkServerNode) zkClient
100-
.readData(new StringBuilder(zkNode).append("/").append(n).toString());
99+
ZkServerNode zksn = (ZkServerNode) zkClient.readData(StringUtil.merge(zkNode, "/", n));
101100
serverInfoList.add(new ServerInfo(zksn.getServerHost(), zksn.getServerPort()));
102101
}
103102
log.debug("ServerInfoList is : {}", serverInfoList);

0 commit comments

Comments
 (0)