君子博学而日参省乎己 则知明而行无过矣

博客园 首页 新随笔 联系 订阅 管理

2013年3月19日 #

摘要: 前面的源码分析由于沿着方法调用跟踪,还有部分类及接口未来得及分析,这里要说的是LoadManagerFactory接口与LoadManager接口及相关类等,先浏览一下UML模型图:这里又是工厂模式,这里的LoadManagerFactory接口及实现类HostLoadManagerFactory源码我就不贴出来了下面分析LoadManager接口源码:/** * Interface for a {@link LoadManager} implementations. */public interface LoadManager extends BatchResultRecorder { /. 阅读全文
posted @ 2013-03-19 04:13 刺猬的温驯 阅读(293) 评论(0) 推荐(0) 编辑

摘要: 这里分析一下FeedConnection接口及其实现类GsaFeedConnection相关源码:FeedConnection接口源码如下:/** * Interface for a feed connection. This takes in a data source name and a data * source object that contains the data to be sent. The actual connection to * the feed server should be established by the implementation during *. 阅读全文
posted @ 2013-03-19 03:33 刺猬的温驯 阅读(410) 评论(0) 推荐(0) 编辑

摘要: 接下来继续分析PusherFactory类及Pusher类的相关源码实现先浏览一下相关UML模型图:我们从该图可以看到,连接器最终是通过FeedConnection类型对象向应用中心发送xmlfeed数据的(勘误:企业搜索引擎开发之连接器connector(六)中的UML图 这部分有点出入)PusherFactory类是Pusher类的工厂类,现在来看PusherFactory源码:/** * Interface for a factory that creates {@link Pusher} instances for use by a * {@link com.google.enterp 阅读全文
posted @ 2013-03-19 03:10 刺猬的温驯 阅读(329) 评论(0) 推荐(0) 编辑

摘要: 接下来继续分析TimedCancelable类及QueryTraverser类TimedCancelable类的源码如下:/** * A {@link TimedCancelable} for running a {@link Connector} batch using * a {@link Traverser} */class CancelableBatch implements TimedCancelable { private static final Logger LOGGER = Logger.getLogger(CancelableBatch.class.getName(... 阅读全文
posted @ 2013-03-19 01:48 刺猬的温驯 阅读(308) 评论(0) 推荐(0) 编辑

摘要: 在继续分析TimedCancelable类及QueryTraverser类之前有必要熟悉一下ThreadPool类和TaskHandle类, 这两者的作用是以线程池的方式执行连接器的功能ThreadPool类源码如下:/** * Pool for running {@link TimedCancel... 阅读全文
posted @ 2013-03-19 01:14 刺猬的温驯 阅读(399) 评论(0) 推荐(0) 编辑