javolution

Win10 搭建 nginx + tomcat 集群 + memcached + session 共享

谁都会走 提交于 2020-05-08 04:39:45
在前两博文的基础上,实现基于memcached的session共享。采用Windows10操作系统。 1. 搭建Tocat集群(参考第一篇博文)。 2. 搭建nginx反向代理服务器(参考第二篇博文)。 3. 搭建memcached缓存系统。memcached 官网没有给出基于windows系统的安装包,这个大家可以再网上搜索。有很多人自己buiild的基于windows系统的memchaed. 安装很简单,直接解压到安装路径下,然后用管理员身份到安装路径下在CMD中执行“memcached.exe -d install”,并执行“memcached.exe -d start”启动memcached. 本文不在描述具体安装过程。接下来讨论利用MSM来实现Tomcat集群的session共享。 1. 下载具体的依赖包,并导入到tomcat的lib下面(本人放在D:\D\apache-tomcat-8.5.30-tomcat1\lib和D:\D\apache-tomcat-8.5.30-tomcat2\lib)。因为序列化方式不一样,导入的依赖包也不一样。 我采用的是javolution方式(kyro序列化方式一直没有测试成功,可能是导入的依赖包版本不match,后续会继续研究),采用javolution方式所需要的依赖包如下: javolution-5.4.3.jar

Java: Javolution: How to use UTF8ByteBufferWriter and MappedByteBuffer?

我怕爱的太早我们不能终老 提交于 2019-12-08 07:26:22
问题 To Anybody that uses the javolution, please guide me on how to use it. Any snippet code helps me a lot. here's my current code: public static void mergeAllFilesJavolution2()throws FileNotFoundException, IOException { String fileDir = "C:\\TestData\\w12"; File dirSrc = new File(fileDir); File[] list = dirSrc.listFiles(); long start = System.currentTimeMillis(); String outFile = fileDir + "\\..\\merged.txt"; File file2 = new File(outFile); //file2.createNewFile(); FileChannel fc2 = (new