CacheInterface.java 831 Bytes
package com.yoho.search.cache.impls;

import com.yoho.core.redis.cluster.operations.serializer.RedisKeyBuilder;
import com.yoho.search.cache.model.CacheObject;

import java.util.*;

public interface CacheInterface {

	public boolean exist(RedisKeyBuilder redisKeyBuilder);

	public CacheObject get(RedisKeyBuilder redisKeyBuilder);

	public void addOrUpdate(RedisKeyBuilder redisKeyBuilder, CacheObject value, int expiredTimeInMinute);

	public void mutiSet(final Map<RedisKeyBuilder,String> map, final int expiredTimeInMinute);

	public List<String> mutiGet(Collection<RedisKeyBuilder> redisKeyBuilders) ;

	public boolean setBitSet(RedisKeyBuilder redisKeyBuilder, BitSet bitSet, int expiredTimeInMinute);

	public Map<Integer, Boolean> getFromBitSet(RedisKeyBuilder key, Collection<Integer> offsets);

}