namespace WIDESEAWCS_RedisService.Counter
{
public interface ICounterService
{
///
/// 递增
///
long Increment(string key, long value = 1);
///
/// 递减
///
long Decrement(string key, long value = 1);
///
/// 获取当前值
///
long GetCount(string key);
///
/// 重置计数器
///
bool Reset(string key);
///
/// 设置带过期时间的计数器
///
long IncrementWithExpiry(string key, TimeSpan expiry, long value = 1);
}
}