Skip to content

Commit 1393ec0

Browse files
committed
Initialize the branch, which is provided by Schooner Information Technology. The branch enhances the client with about 300% performance improvement. It supports text, udp and binary protocol of memcached.
0 parents  commit 1393ec0

File tree

73 files changed

+20040
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+20040
-0
lines changed

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# git-ls-files --others --exclude-from=.git/info/exclude
2+
# Lines that start with '#' are comments.
3+
# For a project mostly in C, the following would be a good set of
4+
# exclude patterns (uncomment them if you want to use them):
5+
*~
6+
classes/
7+
*.swp
8+
__db.*
9+
dist/
10+
*.class
11+
scratch/
12+
.cachedir/
13+
memcached-release*

build.properties

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#-------------------------------------------------------------------------------
2+
# Copyright (c) 2009 Schooner Information Technology, Inc.
3+
# All rights reserved.
4+
#
5+
# http://www.schoonerinfotech.com/
6+
#
7+
# Redistribution and use in source and binary forms, with or without
8+
# modification, are permitted provided that the following conditions
9+
# are met:
10+
# 1. Redistributions of source code must retain the above copyright
11+
# notice, this list of conditions and the following disclaimer.
12+
# 2. Redistributions in binary form must reproduce the above copyright
13+
# notice, this list of conditions and the following disclaimer in the
14+
# documentation and/or other materials provided with the distribution.
15+
# 3. The name of the author may not be used to endorse or promote products
16+
# derived from this software without specific prior written permission.
17+
#
18+
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19+
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20+
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21+
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22+
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23+
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24+
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25+
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27+
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
#-------------------------------------------------------------------------------
29+
doc.dir=doc
30+
src.dir=src/main
31+
test.dir=src/test
32+
build.dir=classes
33+
test.build.dir=testclasses
34+
build.instr.dir=classesinstr
35+
project=java_memcached-release
36+
ver=2.5.0
37+
junit.jar=lib/junit.jar
38+
log4j.jar=lib/log4j.jar
39+
emma.dir=lib
40+
emma.enabled=true
41+
report.dir=report
42+
memcached.host=localhost:11211,localhost:11212

build.xml

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
<?xml version="1.0" encoding="ISO-8859-1"?>
2+
<!--
3+
Copyright (c) 2009 Schooner Information Technology, Inc.
4+
All rights reserved.
5+
6+
http://www.schoonerinfotech.com/
7+
8+
Redistribution and use in source and binary forms, with or without
9+
modification, are permitted provided that the following conditions
10+
are met:
11+
1. Redistributions of source code must retain the above copyright
12+
notice, this list of conditions and the following disclaimer.
13+
2. Redistributions in binary form must reproduce the above copyright
14+
notice, this list of conditions and the following disclaimer in the
15+
documentation and/or other materials provided with the distribution.
16+
3. The name of the author may not be used to endorse or promote products
17+
derived from this software without specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22+
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
-->
30+
<project name="Memcached-Java-Client" default="jar" basedir=".">
31+
<property file="build.properties" />
32+
<path id="emma.lib">
33+
<pathelement location="${emma.dir}/emma.jar" />
34+
<pathelement location="${emma.dir}/emma_ant.jar" />
35+
</path>
36+
<taskdef resource="emma_ant.properties" classpathref="emma.lib" />
37+
<path id="test.classpath">
38+
<pathelement location="${junit.jar}" />
39+
<pathelement location="${log4j.jar}" />
40+
</path>
41+
<target name="clean">
42+
<delete dir="${build.dir}" />
43+
<delete dir="${test.build.dir}" />
44+
</target>
45+
46+
<!-- compilation target for packeging operations -->
47+
<target name="compile" depends="clean">
48+
<mkdir dir="${build.dir}" />
49+
<mkdir dir="${test.build.dir}" />
50+
<javac optimize="yes" srcdir="${src.dir}" destdir="${build.dir}" deprecation="true" target="1.5" source="1.5" nowarn="true" />
51+
<javac optimize="yes" srcdir="${test.dir}" destdir="${test.build.dir}" deprecation="true" target="1.5" source="1.5" nowarn="true">
52+
<classpath refid="test.classpath" />
53+
<classpath path="${build.dir}" />
54+
</javac>
55+
</target>
56+
57+
<target name="jar">
58+
<antcall target="clean" />
59+
<antcall target="compile" />
60+
<jar jarfile="${project}_${ver}.jar">
61+
<fileset dir="${build.dir}">
62+
<include name="com/schooner/MemCached/**/*" />
63+
<include name="com/danga/MemCached/**/*" />
64+
</fileset>
65+
</jar>
66+
<jar jarfile="${project}_test_${ver}.jar">
67+
<fileset dir="${test.build.dir}">
68+
<include name="com/schooner/MemCached/**/*" />
69+
<include name="com/danga/MemCached/**/*" />
70+
</fileset>
71+
</jar>
72+
<antcall target="clean" />
73+
</target>
74+
75+
<target name="runTest" depends="compile">
76+
<emma enabled="${emma.enabled}">
77+
<instr instrpath="${build.dir}" metadatafile="${report.dir}/metadata.emma" mode="overwrite">
78+
<filter value="+com.schooner.MemCached.*, -com.schooner.MemCached.*Test*, -com.danga.MemCached.*" />
79+
</instr>
80+
</emma>
81+
<junit printsummary="yes" showoutput="true" fork="true">
82+
<classpath>
83+
<pathelement location="${build.dir}" />
84+
<pathelement location="${test.build.dir}" />
85+
<path refid="emma.lib" />
86+
<path refid="test.classpath" />
87+
</classpath>
88+
<jvmarg value="-Dmemcached.host=${memcached.host}" />
89+
<jvmarg value="-Demma.coverage.out.file=${report.dir}/coverage.emma" />
90+
<jvmarg value="-Demma.coverage.out.merge=true" />
91+
<formatter type="xml" />
92+
<test name="com.schooner.MemCached.MemCachedClientAsciiTest" todir="${report.dir}" />
93+
<!--Enable the binary protocol unit test by uncomment the following line.
94+
Memcached binary protocol is supported by memcached 1.4+.
95+
Make sure the server is ready before starting these tests.
96+
You can specify the memcached host in the build.properties file in the same folder.
97+
-->
98+
<test name="com.schooner.MemCached.MemCachedClientBinaryTest" todir="${report.dir}" />
99+
<test name="com.schooner.MemCached.MemcachedClientUDPTest" todir="${report.dir}" />
100+
<test name="com.schooner.MemCached.OtherTest" todir="${report.dir}" />
101+
<test name="com.schooner.MemCached.WhalinScenarioTest" todir="${report.dir}" />
102+
</junit>
103+
<junitreport todir="${report.dir}">
104+
<fileset dir="${report.dir}">
105+
<include name="TEST-*.xml" />
106+
</fileset>
107+
<report format="frames" todir="${report.dir}" />
108+
</junitreport>
109+
<emma enabled="${emma.enabled}">
110+
<report sourcepath="${src.dir}">
111+
<fileset dir="${report.dir}">
112+
<include name="*.emma" />
113+
</fileset>
114+
<txt outfile="${report.dir}/coverage.txt" />
115+
<html outfile="${report.dir}/coverage.html" />
116+
</report>
117+
</emma>
118+
</target>
119+
120+
<target name="checkJavadoc">
121+
<available file="javadoc" property="javadoc.present" />
122+
</target>
123+
124+
<target name="checkReport">
125+
<available file="${report.dir}" property="report.present" />
126+
</target>
127+
128+
<target name="removeJavadoc" depends="checkJavadoc" if="javadoc.present">
129+
<delete>
130+
<fileset dir="javadoc">
131+
<include name="*" />
132+
</fileset>
133+
</delete>
134+
</target>
135+
<target name="removeReport" depends="checkReport" if="report.present">
136+
<delete>
137+
<fileset dir="${report.dir}">
138+
<include name="*" />
139+
</fileset>
140+
</delete>
141+
</target>
142+
143+
<target name="all">
144+
<delete>
145+
<fileset dir=".">
146+
<include name="*.jar" />
147+
<include name="*.zip" />
148+
</fileset>
149+
</delete>
150+
<antcall target="removeJavadoc" />
151+
<antcall target="removeReport" />
152+
<antcall target="runTest" />
153+
<antcall target="jar" />
154+
<antcall target="sourceDist" />
155+
<antcall target="javadoc" />
156+
</target>
157+
<target name="sourceDist">
158+
<mkdir dir="${project}_${ver}" />
159+
<copy todir="${project}_${ver}">
160+
<fileset dir=".">
161+
<include name="src/**/*" />
162+
<include name="doc/**/*" />
163+
<include name="lib/**/*" />
164+
<include name="report/**/*" />
165+
<include name=".*" />
166+
<include name="*.xml" />
167+
<include name="*.properties" />
168+
<include name="*.cld" />
169+
</fileset>
170+
</copy>
171+
<zip destfile="${project}_src_${ver}.zip" basedir=".">
172+
<include name="${project}_${ver}/**/*" />
173+
</zip>
174+
<delete dir="${project}_${ver}" />
175+
</target>
176+
<target name="javadoc">
177+
<javadoc access="public" author="true" classpath="lib/junit.jar" destdir="javadoc" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" packagenames="com.schooner.MemCached,com.schooner.MemCached.command,com.danga.MemCached" source="1.5" sourcepath="src/main" splitindex="true" use="true" version="true" />
178+
</target>
179+
</project>

0 commit comments

Comments
 (0)