5.8. 使用自定义 JChannels
构建自定义 JGroups JChannels,如下例所示:
GlobalConfigurationBuilder global = new GlobalConfigurationBuilder();
JChannel jchannel = new JChannel();
// Configure the jchannel as needed.
JGroupsTransport transport = new JGroupsTransport(jchannel);
global.transport().transport(transport);
new DefaultCacheManager(global.build());
注意
网格无法使用已经连接的自定义 JChannels。