- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中net.spy.memcached.transcoders.WhalinTranscoder
类的一些代码示例,展示了WhalinTranscoder
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WhalinTranscoder
类的具体详情如下:
包路径:net.spy.memcached.transcoders.WhalinTranscoder
类名称:WhalinTranscoder
[英]Transcoder that provides compatibility with Greg Whalin's memcached client.
[中]与Greg Whalin的memcached客户端兼容的转码器。
代码示例来源:origin: net.spy/spymemcached
int flags = 0;
if (o instanceof String) {
b = encodeString((String) o);
flags |= SPECIAL_STRING;
if (StringUtils.isJsonObject((String) o)) {
return new CachedData(flags, b, getMaxSize());
b = encodeString(String.valueOf(o));
} else if (o instanceof StringBuilder) {
flags |= SPECIAL_STRINGBUILDER;
b = encodeString(String.valueOf(o));
} else if (o instanceof Long) {
b = tu.encodeLong((Long) o);
flags |= SPECIAL_SHORT;
} else if (o instanceof Boolean) {
b = this.encodeBoolean((Boolean) o);
flags |= SPECIAL_BOOLEAN;
} else if (o instanceof Date) {
flags |= SPECIAL_CHARACTER;
} else {
b = serialize(o);
flags |= SERIALIZED;
byte[] compressed = compress(b);
if (compressed.length < b.length) {
getLogger().debug("Compressed %s from %d to %d",
o.getClass().getName(), b.length, compressed.length);
代码示例来源:origin: net.spy/spymemcached
Object rv = null;
if ((d.getFlags() & COMPRESSED) != 0) {
data = decompress(d.getData());
rv = deserialize(data);
} else {
int f = d.getFlags() & ~COMPRESSED;
switch (f) {
case SPECIAL_BOOLEAN:
rv = Boolean.valueOf(this.decodeBoolean(data));
break;
case SPECIAL_INT:
break;
case SPECIAL_STRING:
rv = decodeString(data);
break;
case SPECIAL_STRINGBUFFER:
rv = new StringBuffer(decodeString(data));
break;
case SPECIAL_STRINGBUILDER:
rv = new StringBuilder(decodeString(data));
break;
case SPECIAL_CHARACTER:
rv = decodeCharacter(data);
break;
default:
getLogger().warn("Cannot handle data with flags %x", f);
代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached
Object rv = null;
if ((d.getFlags() & COMPRESSED) != 0) {
data = decompress(d.getData());
rv = deserialize(data);
} else {
int f = d.getFlags() & ~COMPRESSED;
switch (f) {
case SPECIAL_BOOLEAN:
rv = Boolean.valueOf(this.decodeBoolean(data));
break;
case SPECIAL_INT:
break;
case SPECIAL_STRING:
rv = decodeString(data);
break;
case SPECIAL_STRINGBUFFER:
rv = new StringBuffer(decodeString(data));
break;
case SPECIAL_STRINGBUILDER:
rv = new StringBuilder(decodeString(data));
break;
case SPECIAL_CHARACTER:
rv = decodeCharacter(data);
break;
default:
getLogger().warn("Cannot handle data with flags %x", f);
代码示例来源:origin: naver/arcus-java-client
int flags = 0;
if (o instanceof String) {
b = encodeString((String) o);
flags |= SPECIAL_STRING;
} else if (o instanceof StringBuffer) {
flags |= SPECIAL_STRINGBUFFER;
b = encodeString(String.valueOf(o));
} else if (o instanceof StringBuilder) {
flags |= SPECIAL_STRINGBUILDER;
b = encodeString(String.valueOf(o));
} else if (o instanceof Long) {
b = tu.encodeLong((Long) o);
flags |= SPECIAL_SHORT;
} else if (o instanceof Boolean) {
b = this.encodeBoolean((Boolean) o);
flags |= SPECIAL_BOOLEAN;
} else if (o instanceof Date) {
flags |= SPECIAL_CHARACTER;
} else {
b = serialize(o);
flags |= SERIALIZED;
byte[] compressed = compress(b);
if (compressed.length < b.length) {
getLogger().debug("Compressed %s from %d to %d",
o.getClass().getName(), b.length, compressed.length);
b = compressed;
代码示例来源:origin: com.google.code.maven-play-plugin.spy/spymemcached
Object rv=null;
if((d.getFlags() & COMPRESSED) != 0) {
data=decompress(d.getData());
rv=deserialize(data);
} else {
int f=d.getFlags() & ~COMPRESSED;
switch(f) {
case SPECIAL_BOOLEAN:
rv=Boolean.valueOf(this.decodeBoolean(data));
break;
case SPECIAL_INT:
break;
case SPECIAL_STRING:
rv = decodeString(data);
break;
case SPECIAL_STRINGBUFFER:
rv=new StringBuffer(decodeString(data));
break;
case SPECIAL_STRINGBUILDER:
rv=new StringBuilder(decodeString(data));
break;
case SPECIAL_CHARACTER:
rv = decodeCharacter(data);
break;
default:
getLogger().warn("Cannot handle data with flags %x", f);
代码示例来源:origin: com.google.code.maven-play-plugin.spy/memcached
int flags=0;
if(o instanceof String) {
b=encodeString((String)o);
flags |= SPECIAL_STRING;
} else if(o instanceof StringBuffer) {
flags |= SPECIAL_STRINGBUFFER;
b=encodeString(String.valueOf(o));
} else if(o instanceof StringBuilder) {
flags |= SPECIAL_STRINGBUILDER;
b=encodeString(String.valueOf(o));
} else if(o instanceof Long) {
b=tu.encodeLong((Long)o);
flags |= SPECIAL_SHORT;
} else if(o instanceof Boolean) {
b=this.encodeBoolean((Boolean)o);
flags |= SPECIAL_BOOLEAN;
} else if(o instanceof Date) {
flags |= SPECIAL_CHARACTER;
} else {
b=serialize(o);
flags |= SERIALIZED;
byte[] compressed=compress(b);
if(compressed.length < b.length) {
getLogger().info("Compressed %s from %d to %d",
o.getClass().getName(), b.length, compressed.length);
b=compressed;
代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client
Object rv = null;
if ((d.getFlags() & COMPRESSED) != 0) {
data = decompress(d.getData());
rv = deserialize(data);
} else {
int f = d.getFlags() & ~COMPRESSED;
switch (f) {
case SPECIAL_BOOLEAN:
rv = Boolean.valueOf(this.decodeBoolean(data));
break;
case SPECIAL_INT:
break;
case SPECIAL_STRING:
rv = decodeString(data);
break;
case SPECIAL_STRINGBUFFER:
rv = new StringBuffer(decodeString(data));
break;
case SPECIAL_STRINGBUILDER:
rv = new StringBuilder(decodeString(data));
break;
case SPECIAL_CHARACTER:
rv = decodeCharacter(data);
break;
default:
getLogger().warn("Cannot handle data with flags %x", f);
代码示例来源:origin: com.google.code.maven-play-plugin.spy/spymemcached
int flags=0;
if(o instanceof String) {
b=encodeString((String)o);
flags |= SPECIAL_STRING;
} else if(o instanceof StringBuffer) {
flags |= SPECIAL_STRINGBUFFER;
b=encodeString(String.valueOf(o));
} else if(o instanceof StringBuilder) {
flags |= SPECIAL_STRINGBUILDER;
b=encodeString(String.valueOf(o));
} else if(o instanceof Long) {
b=tu.encodeLong((Long)o);
flags |= SPECIAL_SHORT;
} else if(o instanceof Boolean) {
b=this.encodeBoolean((Boolean)o);
flags |= SPECIAL_BOOLEAN;
} else if(o instanceof Date) {
flags |= SPECIAL_CHARACTER;
} else {
b=serialize(o);
flags |= SERIALIZED;
byte[] compressed=compress(b);
if(compressed.length < b.length) {
getLogger().debug("Compressed %s from %d to %d",
o.getClass().getName(), b.length, compressed.length);
b=compressed;
代码示例来源:origin: com.google.code.maven-play-plugin.spy/memcached
Object rv=null;
if((d.getFlags() & COMPRESSED) != 0) {
data=decompress(d.getData());
rv=deserialize(data);
} else {
int f=d.getFlags() & ~COMPRESSED;
switch(f) {
case SPECIAL_BOOLEAN:
rv=Boolean.valueOf(this.decodeBoolean(data));
break;
case SPECIAL_INT:
break;
case SPECIAL_STRING:
rv = decodeString(data);
break;
case SPECIAL_STRINGBUFFER:
rv=new StringBuffer(decodeString(data));
break;
case SPECIAL_STRINGBUILDER:
rv=new StringBuilder(decodeString(data));
break;
case SPECIAL_CHARACTER:
rv = decodeCharacter(data);
break;
default:
getLogger().warn("Cannot handle data with flags %x", f);
代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached
int flags = 0;
if (o instanceof String) {
b = encodeString((String) o);
flags |= SPECIAL_STRING;
if (StringUtils.isJsonObject((String) o)) {
return new CachedData(flags, b, getMaxSize());
b = encodeString(String.valueOf(o));
} else if (o instanceof StringBuilder) {
flags |= SPECIAL_STRINGBUILDER;
b = encodeString(String.valueOf(o));
} else if (o instanceof Long) {
b = tu.encodeLong((Long) o);
flags |= SPECIAL_SHORT;
} else if (o instanceof Boolean) {
b = this.encodeBoolean((Boolean) o);
flags |= SPECIAL_BOOLEAN;
} else if (o instanceof Date) {
flags |= SPECIAL_CHARACTER;
} else {
b = serialize(o);
flags |= SERIALIZED;
byte[] compressed = compress(b);
if (compressed.length < b.length) {
getLogger().debug("Compressed %s from %d to %d",
o.getClass().getName(), b.length, compressed.length);
代码示例来源:origin: naver/arcus-java-client
Object rv = null;
if ((d.getFlags() & COMPRESSED) != 0) {
data = decompress(d.getData());
rv = deserialize(data);
} else {
int f = d.getFlags() & ~COMPRESSED;
switch (f) {
case SPECIAL_BOOLEAN:
rv = Boolean.valueOf(this.decodeBoolean(data));
break;
case SPECIAL_INT:
break;
case SPECIAL_STRING:
rv = decodeString(data);
break;
case SPECIAL_STRINGBUFFER:
rv = new StringBuffer(decodeString(data));
break;
case SPECIAL_STRINGBUILDER:
rv = new StringBuilder(decodeString(data));
break;
case SPECIAL_CHARACTER:
rv = decodeCharacter(data);
break;
default:
getLogger().warn("Cannot handle data with flags %x", f);
代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client
int flags = 0;
if (o instanceof String) {
b = encodeString((String) o);
flags |= SPECIAL_STRING;
if (StringUtils.isJsonObject((String) o)) {
return new CachedData(flags, b, getMaxSize());
b = encodeString(String.valueOf(o));
} else if (o instanceof StringBuilder) {
flags |= SPECIAL_STRINGBUILDER;
b = encodeString(String.valueOf(o));
} else if (o instanceof Long) {
b = tu.encodeLong((Long) o);
flags |= SPECIAL_SHORT;
} else if (o instanceof Boolean) {
b = this.encodeBoolean((Boolean) o);
flags |= SPECIAL_BOOLEAN;
} else if (o instanceof Date) {
flags |= SPECIAL_CHARACTER;
} else {
b = serialize(o);
flags |= SERIALIZED;
byte[] compressed = compress(b);
if (compressed.length < b.length) {
getLogger().debug("Compressed %s from %d to %d",
o.getClass().getName(), b.length, compressed.length);
本文整理了Java中net.spy.memcached.transcoders.WhalinTranscoder.encodeBoolean()方法的一些代码示例,展示了WhalinTranscode
本文整理了Java中net.spy.memcached.transcoders.WhalinTranscoder.getLogger()方法的一些代码示例,展示了WhalinTranscoder.ge
本文整理了Java中net.spy.memcached.transcoders.WhalinTranscoder.decompress()方法的一些代码示例,展示了WhalinTranscoder.d
本文整理了Java中net.spy.memcached.transcoders.WhalinTranscoder.getMaxSize()方法的一些代码示例,展示了WhalinTranscoder.g
本文整理了Java中net.spy.memcached.transcoders.WhalinTranscoder.decodeCharacter()方法的一些代码示例,展示了WhalinTransco
本文整理了Java中net.spy.memcached.transcoders.WhalinTranscoder.deserialize()方法的一些代码示例,展示了WhalinTranscoder.
本文整理了Java中net.spy.memcached.transcoders.WhalinTranscoder.serialize()方法的一些代码示例,展示了WhalinTranscoder.se
本文整理了Java中net.spy.memcached.transcoders.WhalinTranscoder.decodeString()方法的一些代码示例,展示了WhalinTranscoder
本文整理了Java中net.spy.memcached.transcoders.WhalinTranscoder.compress()方法的一些代码示例,展示了WhalinTranscoder.com
本文整理了Java中net.spy.memcached.transcoders.WhalinTranscoder.encodeString()方法的一些代码示例,展示了WhalinTranscoder
本文整理了Java中net.spy.memcached.transcoders.WhalinTranscoder.decodeBoolean()方法的一些代码示例,展示了WhalinTranscode
我是一名优秀的程序员,十分优秀!