XXL-REGISTRY, A lightweight distributed service registry and discovery platform.
-- Home Page --
这个主要是想参考如何实现一个注册中心,具体的项目地址:https://github.com/xuxueli/xxl-registry
请查看doc
目录下的介绍
要点:
1.在xxl-registry-client
子项目中,最重要的类是: XxlRegistryClient.java
2.在xxl-registry-admin
子项目中,最重要的类是:XxlRegistryServiceImpl.java
这两块都涉及了多线程的一些东西。
在xxl-registry-client
中,启动了两个线程:一个是registryThread,一个是discoveryThread
在xxl-registry-admin
中,通过ExecutorService,来启动10个线程。进行注册,发现,清除操作。