jedis源码阅读
package redis.clients.jedis; import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import redis.clients.util.SafeEncoder;
import redis.clients.util.Slowlog; public class Jedis extends BinaryJedis implements JedisCommands
{
public Jedis(String host)
{
super(host);
} public Jedis(String host, int port) {
super(host, port);
} public Jedis(String host, int port, int timeout) {
super(host, port, timeout);
} public Jedis(JedisShardInfo shardInfo) {
super(shardInfo);
} public String ping() {
checkIsInMulti();
this.client.ping();
return this.client.getStatusCodeReply();
} public String set(String key, String value)
{
checkIsInMulti();
this.client.set(key, value);
return this.client.getStatusCodeReply();
} public String get(String key)
{
checkIsInMulti();
this.client.sendCommand(Protocol.Command.GET, new String[] { key });
return this.client.getBulkReply();
} public String quit()
{
checkIsInMulti();
this.client.quit();
return this.client.getStatusCodeReply();
} public Boolean exists(String key)
{
checkIsInMulti();
this.client.exists(key);
return Boolean.valueOf(this.client.getIntegerReply().longValue() == 1L);
} public Long del(String... keys)
{
checkIsInMulti();
this.client.del(keys);
return this.client.getIntegerReply();
} public String type(String key)
{
checkIsInMulti();
this.client.type(key);
return this.client.getStatusCodeReply();
} public String flushDB()
{
checkIsInMulti();
this.client.flushDB();
return this.client.getStatusCodeReply();
} public Set<String> keys(String pattern)
{
checkIsInMulti();
this.client.keys(pattern);
return (Set)BuilderFactory.STRING_SET.build(this.client.getBinaryMultiBulkReply());
} public String randomKey()
{
checkIsInMulti();
this.client.randomKey();
return this.client.getBulkReply();
} public String rename(String oldkey, String newkey)
{
checkIsInMulti();
this.client.rename(oldkey, newkey);
return this.client.getStatusCodeReply();
} public Long renamenx(String oldkey, String newkey)
{
checkIsInMulti();
this.client.renamenx(oldkey, newkey);
return this.client.getIntegerReply();
} public Long expire(String key, int seconds)
{
checkIsInMulti();
this.client.expire(key, seconds);
return this.client.getIntegerReply();
} public Long expireAt(String key, long unixTime)
{
checkIsInMulti();
this.client.expireAt(key, unixTime);
return this.client.getIntegerReply();
} public Long ttl(String key)
{
checkIsInMulti();
this.client.ttl(key);
return this.client.getIntegerReply();
} public String select(int index)
{
checkIsInMulti();
this.client.select(index);
return this.client.getStatusCodeReply();
} public Long move(String key, int dbIndex)
{
checkIsInMulti();
this.client.move(key, dbIndex);
return this.client.getIntegerReply();
} public String flushAll()
{
checkIsInMulti();
this.client.flushAll();
return this.client.getStatusCodeReply();
} public String getSet(String key, String value)
{
checkIsInMulti();
this.client.getSet(key, value);
return this.client.getBulkReply();
} public List<String> mget(String... keys)
{
checkIsInMulti();
this.client.mget(keys);
return this.client.getMultiBulkReply();
} public Long setnx(String key, String value)
{
checkIsInMulti();
this.client.setnx(key, value);
return this.client.getIntegerReply();
} public String setex(String key, int seconds, String value)
{
checkIsInMulti();
this.client.setex(key, seconds, value);
return this.client.getStatusCodeReply();
} public String mset(String... keysvalues)
{
checkIsInMulti();
this.client.mset(keysvalues);
return this.client.getStatusCodeReply();
} public Long msetnx(String... keysvalues)
{
checkIsInMulti();
this.client.msetnx(keysvalues);
return this.client.getIntegerReply();
} public Long decrBy(String key, long integer)
{
checkIsInMulti();
this.client.decrBy(key, integer);
return this.client.getIntegerReply();
} public Long decr(String key)
{
checkIsInMulti();
this.client.decr(key);
return this.client.getIntegerReply();
} public Long incrBy(String key, long integer)
{
checkIsInMulti();
this.client.incrBy(key, integer);
return this.client.getIntegerReply();
} public Long incr(String key)
{
checkIsInMulti();
this.client.incr(key);
return this.client.getIntegerReply();
} public Long append(String key, String value)
{
checkIsInMulti();
this.client.append(key, value);
return this.client.getIntegerReply();
} public String substr(String key, int start, int end)
{
checkIsInMulti();
this.client.substr(key, start, end);
return this.client.getBulkReply();
} public Long hset(String key, String field, String value)
{
checkIsInMulti();
this.client.hset(key, field, value);
return this.client.getIntegerReply();
} public String hget(String key, String field)
{
checkIsInMulti();
this.client.hget(key, field);
return this.client.getBulkReply();
} public Long hsetnx(String key, String field, String value)
{
checkIsInMulti();
this.client.hsetnx(key, field, value);
return this.client.getIntegerReply();
} public String hmset(String key, Map<String, String> hash)
{
checkIsInMulti();
this.client.hmset(key, hash);
return this.client.getStatusCodeReply();
} public List<String> hmget(String key, String... fields)
{
checkIsInMulti();
this.client.hmget(key, fields);
return this.client.getMultiBulkReply();
} public Long hincrBy(String key, String field, long value)
{
checkIsInMulti();
this.client.hincrBy(key, field, value);
return this.client.getIntegerReply();
} public Boolean hexists(String key, String field)
{
checkIsInMulti();
this.client.hexists(key, field);
return Boolean.valueOf(this.client.getIntegerReply().longValue() == 1L);
} public Long hdel(String key, String... fields)
{
checkIsInMulti();
this.client.hdel(key, fields);
return this.client.getIntegerReply();
} public Long hlen(String key)
{
checkIsInMulti();
this.client.hlen(key);
return this.client.getIntegerReply();
} public Set<String> hkeys(String key)
{
checkIsInMulti();
this.client.hkeys(key);
return (Set)BuilderFactory.STRING_SET.build(this.client.getBinaryMultiBulkReply());
} public List<String> hvals(String key)
{
checkIsInMulti();
this.client.hvals(key);
List<String> lresult = this.client.getMultiBulkReply();
return lresult;
} public Map<String, String> hgetAll(String key)
{
checkIsInMulti();
this.client.hgetAll(key);
return (Map)BuilderFactory.STRING_MAP.build(this.client.getBinaryMultiBulkReply());
} public Long rpush(String key, String... strings)
{
checkIsInMulti();
this.client.rpush(key, strings);
return this.client.getIntegerReply();
} public Long lpush(String key, String... strings)
{
checkIsInMulti();
this.client.lpush(key, strings);
return this.client.getIntegerReply();
} public Long llen(String key)
{
checkIsInMulti();
this.client.llen(key);
return this.client.getIntegerReply();
} public List<String> lrange(String key, long start, long end)
{
checkIsInMulti();
this.client.lrange(key, start, end);
return this.client.getMultiBulkReply();
} public String ltrim(String key, long start, long end)
{
checkIsInMulti();
this.client.ltrim(key, start, end);
return this.client.getStatusCodeReply();
} public String lindex(String key, long index)
{
checkIsInMulti();
this.client.lindex(key, index);
return this.client.getBulkReply();
} public String lset(String key, long index, String value)
{
checkIsInMulti();
this.client.lset(key, index, value);
return this.client.getStatusCodeReply();
} public Long lrem(String key, long count, String value)
{
checkIsInMulti();
this.client.lrem(key, count, value);
return this.client.getIntegerReply();
} public String lpop(String key)
{
checkIsInMulti();
this.client.lpop(key);
return this.client.getBulkReply();
} public String rpop(String key)
{
checkIsInMulti();
this.client.rpop(key);
return this.client.getBulkReply();
} public String rpoplpush(String srckey, String dstkey)
{
checkIsInMulti();
this.client.rpoplpush(srckey, dstkey);
return this.client.getBulkReply();
} public Long sadd(String key, String... members)
{
checkIsInMulti();
this.client.sadd(key, members);
return this.client.getIntegerReply();
} public Set<String> smembers(String key)
{
checkIsInMulti();
this.client.smembers(key);
List<String> members = this.client.getMultiBulkReply();
return new HashSet(members);
} public Long srem(String key, String... members)
{
checkIsInMulti();
this.client.srem(key, members);
return this.client.getIntegerReply();
} public String spop(String key)
{
checkIsInMulti();
this.client.spop(key);
return this.client.getBulkReply();
} public Long smove(String srckey, String dstkey, String member)
{
checkIsInMulti();
this.client.smove(srckey, dstkey, member);
return this.client.getIntegerReply();
} public Long scard(String key)
{
checkIsInMulti();
this.client.scard(key);
return this.client.getIntegerReply();
} public Boolean sismember(String key, String member)
{
checkIsInMulti();
this.client.sismember(key, member);
return Boolean.valueOf(this.client.getIntegerReply().longValue() == 1L);
} public Set<String> sinter(String... keys)
{
checkIsInMulti();
this.client.sinter(keys);
List<String> members = this.client.getMultiBulkReply();
return new HashSet(members);
} public Long sinterstore(String dstkey, String... keys)
{
checkIsInMulti();
this.client.sinterstore(dstkey, keys);
return this.client.getIntegerReply();
} public Set<String> sunion(String... keys)
{
checkIsInMulti();
this.client.sunion(keys);
List<String> members = this.client.getMultiBulkReply();
return new HashSet(members);
} public Long sunionstore(String dstkey, String... keys)
{
checkIsInMulti();
this.client.sunionstore(dstkey, keys);
return this.client.getIntegerReply();
} public Set<String> sdiff(String... keys)
{
checkIsInMulti();
this.client.sdiff(keys);
return (Set)BuilderFactory.STRING_SET.build(this.client.getBinaryMultiBulkReply());
} public Long sdiffstore(String dstkey, String... keys)
{
checkIsInMulti();
this.client.sdiffstore(dstkey, keys);
return this.client.getIntegerReply();
} public String srandmember(String key)
{
checkIsInMulti();
this.client.srandmember(key);
return this.client.getBulkReply();
} public Long zadd(String key, double score, String member)
{
checkIsInMulti();
this.client.zadd(key, score, member);
return this.client.getIntegerReply();
} public Long zadd(String key, Map<Double, String> scoreMembers) {
checkIsInMulti();
this.client.zadd(key, scoreMembers);
return this.client.getIntegerReply();
} public Set<String> zrange(String key, long start, long end) {
checkIsInMulti();
this.client.zrange(key, start, end);
List<String> members = this.client.getMultiBulkReply();
return new LinkedHashSet(members);
} public Long zrem(String key, String... members)
{
checkIsInMulti();
this.client.zrem(key, members);
return this.client.getIntegerReply();
} public Double zincrby(String key, double score, String member)
{
checkIsInMulti();
this.client.zincrby(key, score, member);
String newscore = this.client.getBulkReply();
return Double.valueOf(newscore);
} public Long zrank(String key, String member)
{
checkIsInMulti();
this.client.zrank(key, member);
return this.client.getIntegerReply();
} public Long zrevrank(String key, String member)
{
checkIsInMulti();
this.client.zrevrank(key, member);
return this.client.getIntegerReply();
} public Set<String> zrevrange(String key, long start, long end)
{
checkIsInMulti();
this.client.zrevrange(key, start, end);
List<String> members = this.client.getMultiBulkReply();
return new LinkedHashSet(members);
} public Set<Tuple> zrangeWithScores(String key, long start, long end)
{
checkIsInMulti();
this.client.zrangeWithScores(key, start, end);
Set<Tuple> set = getTupledSet();
return set;
} public Set<Tuple> zrevrangeWithScores(String key, long start, long end)
{
checkIsInMulti();
this.client.zrevrangeWithScores(key, start, end);
Set<Tuple> set = getTupledSet();
return set;
} public Long zcard(String key)
{
checkIsInMulti();
this.client.zcard(key);
return this.client.getIntegerReply();
} public Double zscore(String key, String member)
{
checkIsInMulti();
this.client.zscore(key, member);
String score = this.client.getBulkReply();
return score != null ? new Double(score) : null;
} public String watch(String... keys) {
this.client.watch(keys);
return this.client.getStatusCodeReply();
} public List<String> sort(String key)
{
checkIsInMulti();
this.client.sort(key);
return this.client.getMultiBulkReply();
} public List<String> sort(String key, SortingParams sortingParameters)
{
checkIsInMulti();
this.client.sort(key, sortingParameters);
return this.client.getMultiBulkReply();
} public List<String> blpop(int timeout, String... keys)
{
checkIsInMulti();
List<String> args = new ArrayList();
for (String arg : keys) {
args.add(arg);
}
args.add(String.valueOf(timeout)); this.client.blpop((String[])args.toArray(new String[args.size()]));
this.client.setTimeoutInfinite();
List<String> multiBulkReply = this.client.getMultiBulkReply();
this.client.rollbackTimeout();
return multiBulkReply;
} public Long sort(String key, SortingParams sortingParameters, String dstkey)
{
checkIsInMulti();
this.client.sort(key, sortingParameters, dstkey);
return this.client.getIntegerReply();
} public Long sort(String key, String dstkey)
{
checkIsInMulti();
this.client.sort(key, dstkey);
return this.client.getIntegerReply();
} public List<String> brpop(int timeout, String... keys)
{
checkIsInMulti();
List<String> args = new ArrayList();
for (String arg : keys) {
args.add(arg);
}
args.add(String.valueOf(timeout)); this.client.brpop((String[])args.toArray(new String[args.size()]));
this.client.setTimeoutInfinite();
List<String> multiBulkReply = this.client.getMultiBulkReply();
this.client.rollbackTimeout(); return multiBulkReply;
} public String auth(String password)
{
checkIsInMulti();
this.client.auth(password);
return this.client.getStatusCodeReply();
} public void subscribe(JedisPubSub jedisPubSub, String... channels) {
checkIsInMulti();
connect();
this.client.setTimeoutInfinite();
jedisPubSub.proceed(this.client, channels);
this.client.rollbackTimeout();
} public Long publish(String channel, String message) {
checkIsInMulti();
this.client.publish(channel, message);
return this.client.getIntegerReply();
} public void psubscribe(JedisPubSub jedisPubSub, String... patterns) {
checkIsInMulti();
connect();
this.client.setTimeoutInfinite();
jedisPubSub.proceedWithPatterns(this.client, patterns);
this.client.rollbackTimeout();
} public Long zcount(String key, double min, double max) {
checkIsInMulti();
this.client.zcount(key, min, max);
return this.client.getIntegerReply();
} public Long zcount(String key, String min, String max) {
checkIsInMulti();
this.client.zcount(key, min, max);
return this.client.getIntegerReply();
} public Set<String> zrangeByScore(String key, double min, double max)
{
checkIsInMulti();
this.client.zrangeByScore(key, min, max);
return new LinkedHashSet(this.client.getMultiBulkReply());
} public Set<String> zrangeByScore(String key, String min, String max)
{
checkIsInMulti();
this.client.zrangeByScore(key, min, max);
return new LinkedHashSet(this.client.getMultiBulkReply());
} public Set<String> zrangeByScore(String key, double min, double max, int offset, int count)
{
checkIsInMulti();
this.client.zrangeByScore(key, min, max, offset, count);
return new LinkedHashSet(this.client.getMultiBulkReply());
} public Set<String> zrangeByScore(String key, String min, String max, int offset, int count)
{
checkIsInMulti();
this.client.zrangeByScore(key, min, max, offset, count);
return new LinkedHashSet(this.client.getMultiBulkReply());
} public Set<Tuple> zrangeByScoreWithScores(String key, double min, double max)
{
checkIsInMulti();
this.client.zrangeByScoreWithScores(key, min, max);
Set<Tuple> set = getTupledSet();
return set;
} public Set<Tuple> zrangeByScoreWithScores(String key, String min, String max)
{
checkIsInMulti();
this.client.zrangeByScoreWithScores(key, min, max);
Set<Tuple> set = getTupledSet();
return set;
} public Set<Tuple> zrangeByScoreWithScores(String key, double min, double max, int offset, int count)
{
checkIsInMulti();
this.client.zrangeByScoreWithScores(key, min, max, offset, count);
Set<Tuple> set = getTupledSet();
return set;
} public Set<Tuple> zrangeByScoreWithScores(String key, String min, String max, int offset, int count)
{
checkIsInMulti();
this.client.zrangeByScoreWithScores(key, min, max, offset, count);
Set<Tuple> set = getTupledSet();
return set;
} private Set<Tuple> getTupledSet() {
checkIsInMulti();
List<String> membersWithScores = this.client.getMultiBulkReply();
Set<Tuple> set = new LinkedHashSet();
Iterator<String> iterator = membersWithScores.iterator();
while (iterator.hasNext()) {
set.add(new Tuple((String)iterator.next(), Double.valueOf((String)iterator.next())));
}
return set;
} public Set<String> zrevrangeByScore(String key, double max, double min)
{
checkIsInMulti();
this.client.zrevrangeByScore(key, max, min);
return new LinkedHashSet(this.client.getMultiBulkReply());
} public Set<String> zrevrangeByScore(String key, String max, String min)
{
checkIsInMulti();
this.client.zrevrangeByScore(key, max, min);
return new LinkedHashSet(this.client.getMultiBulkReply());
} public Set<String> zrevrangeByScore(String key, double max, double min, int offset, int count)
{
checkIsInMulti();
this.client.zrevrangeByScore(key, max, min, offset, count);
return new LinkedHashSet(this.client.getMultiBulkReply());
} public Set<Tuple> zrevrangeByScoreWithScores(String key, double max, double min)
{
checkIsInMulti();
this.client.zrevrangeByScoreWithScores(key, max, min);
Set<Tuple> set = getTupledSet();
return set;
} public Set<Tuple> zrevrangeByScoreWithScores(String key, double max, double min, int offset, int count)
{
checkIsInMulti();
this.client.zrevrangeByScoreWithScores(key, max, min, offset, count);
Set<Tuple> set = getTupledSet();
return set;
} public Set<Tuple> zrevrangeByScoreWithScores(String key, String max, String min, int offset, int count)
{
checkIsInMulti();
this.client.zrevrangeByScoreWithScores(key, max, min, offset, count);
Set<Tuple> set = getTupledSet();
return set;
} public Set<String> zrevrangeByScore(String key, String max, String min, int offset, int count)
{
checkIsInMulti();
this.client.zrevrangeByScore(key, max, min, offset, count);
return new LinkedHashSet(this.client.getMultiBulkReply());
} public Set<Tuple> zrevrangeByScoreWithScores(String key, String max, String min)
{
checkIsInMulti();
this.client.zrevrangeByScoreWithScores(key, max, min);
Set<Tuple> set = getTupledSet();
return set;
} public Long zremrangeByRank(String key, long start, long end)
{
checkIsInMulti();
this.client.zremrangeByRank(key, start, end);
return this.client.getIntegerReply();
} public Long zremrangeByScore(String key, double start, double end)
{
checkIsInMulti();
this.client.zremrangeByScore(key, start, end);
return this.client.getIntegerReply();
} public Long zremrangeByScore(String key, String start, String end)
{
checkIsInMulti();
this.client.zremrangeByScore(key, start, end);
return this.client.getIntegerReply();
} public Long zunionstore(String dstkey, String... sets)
{
checkIsInMulti();
this.client.zunionstore(dstkey, sets);
return this.client.getIntegerReply();
} public Long zunionstore(String dstkey, ZParams params, String... sets)
{
checkIsInMulti();
this.client.zunionstore(dstkey, params, sets);
return this.client.getIntegerReply();
} public Long zinterstore(String dstkey, String... sets)
{
checkIsInMulti();
this.client.zinterstore(dstkey, sets);
return this.client.getIntegerReply();
} public Long zinterstore(String dstkey, ZParams params, String... sets)
{
checkIsInMulti();
this.client.zinterstore(dstkey, params, sets);
return this.client.getIntegerReply();
} public Long strlen(String key) {
this.client.strlen(key);
return this.client.getIntegerReply();
} public Long lpushx(String key, String string) {
this.client.lpushx(key, string);
return this.client.getIntegerReply();
} public Long persist(String key)
{
this.client.persist(key);
return this.client.getIntegerReply();
} public Long rpushx(String key, String string) {
this.client.rpushx(key, string);
return this.client.getIntegerReply();
} public String echo(String string) {
this.client.echo(string);
return this.client.getBulkReply();
} public Long linsert(String key, BinaryClient.LIST_POSITION where, String pivot, String value)
{
this.client.linsert(key, where, pivot, value);
return this.client.getIntegerReply();
} public String brpoplpush(String source, String destination, int timeout)
{
this.client.brpoplpush(source, destination, timeout);
this.client.setTimeoutInfinite();
String reply = this.client.getBulkReply();
this.client.rollbackTimeout();
return reply;
} public Boolean setbit(String key, long offset, boolean value)
{
this.client.setbit(key, offset, value);
return Boolean.valueOf(this.client.getIntegerReply().longValue() == 1L);
} public Boolean getbit(String key, long offset)
{
this.client.getbit(key, offset);
return Boolean.valueOf(this.client.getIntegerReply().longValue() == 1L);
} public Long setrange(String key, long offset, String value) {
this.client.setrange(key, offset, value);
return this.client.getIntegerReply();
} public String getrange(String key, long startOffset, long endOffset) {
this.client.getrange(key, startOffset, endOffset);
return this.client.getBulkReply();
} public List<String> configGet(String pattern)
{
this.client.configGet(pattern);
return this.client.getMultiBulkReply();
} public String configSet(String parameter, String value)
{
this.client.configSet(parameter, value);
return this.client.getStatusCodeReply();
} public Object eval(String script, int keyCount, String... params) {
this.client.setTimeoutInfinite();
this.client.eval(script, keyCount, params); return getEvalResult();
} private String[] getParams(List<String> keys, List<String> args) {
int keyCount = keys.size();
int argCount = args.size(); String[] params = new String[keyCount + args.size()]; for (int i = 0; i < keyCount; i++) {
params[i] = ((String)keys.get(i));
}
for (int i = 0; i < argCount; i++) {
params[(keyCount + i)] = ((String)args.get(i));
}
return params;
} public Object eval(String script, List<String> keys, List<String> args) {
return eval(script, keys.size(), getParams(keys, args));
} public Object eval(String script) {
return eval(script, 0, new String[0]);
} public Object evalsha(String script) {
return evalsha(script, 0, new String[0]);
} private Object getEvalResult() {
Object result = this.client.getOne(); if ((result instanceof byte[])) {
return SafeEncoder.encode((byte[])result);
}
if ((result instanceof List)) {
List<?> list = (List)result;
List<String> listResult = new ArrayList(list.size());
for (Iterator i$ = list.iterator(); i$.hasNext();) { Object bin = i$.next();
listResult.add(SafeEncoder.encode((byte[])bin));
}
return listResult;
} return result;
} public Object evalsha(String sha1, List<String> keys, List<String> args) {
return evalsha(sha1, keys.size(), getParams(keys, args));
} public Object evalsha(String sha1, int keyCount, String... params) {
checkIsInMulti();
this.client.evalsha(sha1, keyCount, params); return getEvalResult();
} public Boolean scriptExists(String sha1) {
String[] a = new String[1];
a[0] = sha1;
return (Boolean)scriptExists(a).get(0);
} public List<Boolean> scriptExists(String... sha1) {
this.client.scriptExists(sha1);
List<Long> result = this.client.getIntegerMultiBulkReply();
List<Boolean> exists = new ArrayList(); for (Long value : result) {
exists.add(Boolean.valueOf(value.longValue() == 1L));
}
return exists;
} public String scriptLoad(String script) {
this.client.scriptLoad(script);
return this.client.getBulkReply();
} public List<Slowlog> slowlogGet() {
this.client.slowlogGet();
return Slowlog.from(this.client.getObjectMultiBulkReply());
} public List<Slowlog> slowlogGet(long entries) {
this.client.slowlogGet(entries);
return Slowlog.from(this.client.getObjectMultiBulkReply());
} public Long objectRefcount(String string) {
this.client.objectRefcount(string);
return this.client.getIntegerReply();
} public String objectEncoding(String string) {
this.client.objectEncoding(string);
return this.client.getBulkReply();
} public Long objectIdletime(String string) {
this.client.objectIdletime(string);
return this.client.getIntegerReply();
}
}
jedis源码阅读的更多相关文章
- 【原】FMDB源码阅读(三)
[原]FMDB源码阅读(三) 本文转载请注明出处 —— polobymulberry-博客园 1. 前言 FMDB比较优秀的地方就在于对多线程的处理.所以这一篇主要是研究FMDB的多线程处理的实现.而 ...
- 【原】FMDB源码阅读(二)
[原]FMDB源码阅读(二) 本文转载请注明出处 -- polobymulberry-博客园 1. 前言 上一篇只是简单地过了一下FMDB一个简单例子的基本流程,并没有涉及到FMDB的所有方方面面,比 ...
- 【原】FMDB源码阅读(一)
[原]FMDB源码阅读(一) 本文转载请注明出处 —— polobymulberry-博客园 1. 前言 说实话,之前的SDWebImage和AFNetworking这两个组件我还是使用过的,但是对于 ...
- 【原】AFNetworking源码阅读(六)
[原]AFNetworking源码阅读(六) 本文转载请注明出处 —— polobymulberry-博客园 1. 前言 这一篇的想讲的,一个就是分析一下AFSecurityPolicy文件,看看AF ...
- 【原】AFNetworking源码阅读(五)
[原]AFNetworking源码阅读(五) 本文转载请注明出处 —— polobymulberry-博客园 1. 前言 上一篇中提及到了Multipart Request的构建方法- [AFHTTP ...
- 【原】AFNetworking源码阅读(四)
[原]AFNetworking源码阅读(四) 本文转载请注明出处 —— polobymulberry-博客园 1. 前言 上一篇还遗留了很多问题,包括AFURLSessionManagerTaskDe ...
- 【原】AFNetworking源码阅读(三)
[原]AFNetworking源码阅读(三) 本文转载请注明出处 —— polobymulberry-博客园 1. 前言 上一篇的话,主要是讲了如何通过构建一个request来生成一个data tas ...
- 【原】AFNetworking源码阅读(二)
[原]AFNetworking源码阅读(二) 本文转载请注明出处 —— polobymulberry-博客园 1. 前言 上一篇中我们在iOS Example代码中提到了AFHTTPSessionMa ...
- 【原】AFNetworking源码阅读(一)
[原]AFNetworking源码阅读(一) 本文转载请注明出处 —— polobymulberry-博客园 1. 前言 AFNetworking版本:3.0.4 由于我平常并没有经常使用AFNetw ...
随机推荐
- mac上SVN项目管理,提示被锁定的解决方法
问题 mac上SVN项目管理,提示被锁定.不能commit.也不能update.提示 clean the working copy and then. .. 解决方法 watermark/2/text ...
- 【转】Win7环境下VS2010配置Cocos2d-x-2.1.4最新版本的开发环境(亲测)
http://blog.csdn.net/ccf19881030/article/details/9204801 很久以前使用博客园博主子龙山人的一篇博文<Cocos2d-x win7+vs20 ...
- 【排障】每次打开word都提示要安装配置
为什么每次打开word都提示要安装配置?很多人在打开word时,总是提示要安装配置一遍,花去不少时间,这是由于电脑里有两个不同版本的office软件,产生的原因可能是原来的卸载了没卸载干净,或是安装了 ...
- magento中的一些技巧
1.加载某个attribute: $attributeCode=Mage::getModel('catalog/resource_eav_attribute') ...
- c# switch case语句
switch是一个控制语句,用于选择一个要执行的语句块. 一个switch语句包括一个或多个执行的语句块.每个语句块包括一个或多个case标签,case后接要执行的语句. 如下面的代码 Codeint ...
- ElastciSearch常用APi
列出所有的索引: GET /_cat/indices?v 删除索引 DELETE /customer?pretty
- iOS开发——友盟分享
==========2016-01-29 更新=====刘成利 email:liu_cheng_li@qq.com========== 自己成功集成到公司的项目前,也已做了测试好的友盟分享demo 目 ...
- iOS开发——扫描二维码——工具类
(代码已测试好,空闲时间更新……)
- 项目报错-无法解析类型 XXXX.xx 从必需的 .class 文件间接引用了它
这个编译错误有几个原因 1.jdk版本问题 要是报错是某些java包里的东西那就可以肯定是jdk版本的问题, 比如无法解析类型java.lang.Object,无法解析类型java.lang.Char ...
- Splay tree
类别:二叉排序树 空间效率:O(n) 时间效率:O(log n)内完成插入.查找.删除操作 创造者:Daniel Sleator和Robert Tarjan 优点:每次查询会调整树的结构,使被查询频率 ...