File tree Expand file tree Collapse file tree 4 files changed +67
-0
lines changed Expand file tree Collapse file tree 4 files changed +67
-0
lines changed Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <classpath >
3+ <classpathentry kind =" src" path =" src" />
4+ <classpathentry kind =" con" path =" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6" />
5+ <classpathentry kind =" lib" path =" /opt/Memcached-Java-Client/memcached-1.0.jar" sourcepath =" /opt/Memcached-Java-Client/src" />
6+ <classpathentry kind =" output" path =" bin" />
7+ </classpath >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <projectDescription >
3+ <name >cacheTest</name >
4+ <comment ></comment >
5+ <projects >
6+ </projects >
7+ <buildSpec >
8+ <buildCommand >
9+ <name >org.eclipse.jdt.core.javabuilder</name >
10+ <arguments >
11+ </arguments >
12+ </buildCommand >
13+ </buildSpec >
14+ <natures >
15+ <nature >org.eclipse.jdt.core.javanature</nature >
16+ </natures >
17+ </projectDescription >
Original file line number Diff line number Diff line change 1+ eclipse.preferences.version =1
2+ org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode =enabled
3+ org.eclipse.jdt.core.compiler.codegen.targetPlatform =1.6
4+ org.eclipse.jdt.core.compiler.codegen.unusedLocal =preserve
5+ org.eclipse.jdt.core.compiler.compliance =1.6
6+ org.eclipse.jdt.core.compiler.debug.lineNumber =generate
7+ org.eclipse.jdt.core.compiler.debug.localVariable =generate
8+ org.eclipse.jdt.core.compiler.debug.sourceFile =generate
9+ org.eclipse.jdt.core.compiler.problem.assertIdentifier =error
10+ org.eclipse.jdt.core.compiler.problem.enumIdentifier =error
11+ org.eclipse.jdt.core.compiler.source =1.6
Original file line number Diff line number Diff line change 1+ package cacheTest ;
2+
3+ import com .meetup .memcached .SockIOPool ;
4+ import com .meetup .memcached .MemcachedClient ;
5+
6+ //import java.util.*;
7+
8+
9+ public class cacheClient {
10+ public static void main (String [] args )
11+ {
12+ String [] servers = {"marketsimplified.com:11211" };
13+ SockIOPool pool = SockIOPool .getInstance ("BetaCache" );
14+
15+ pool .setServers ( servers );
16+ pool .setFailover ( true );
17+ pool .setInitConn ( 10 );
18+ pool .setMinConn ( 5 );
19+ pool .setMaxConn ( 250 );
20+ pool .setMaintSleep ( 30 );
21+ pool .setNagle ( false );
22+ pool .setSocketTO ( 3000 );
23+ pool .setAliveCheck ( true );
24+ pool .initialize ();
25+
26+ MemcachedClient mcc = new MemcachedClient ("BetaCache" );
27+
28+ System .out .println ("add status:" +mcc .add ("1" , "Original" ));
29+ System .out .println ("Get from Cache:" +mcc .get ("1" ));
30+
31+ }
32+ }
You can’t perform that action at this time.
0 commit comments