org.springframework.data.redis.connection.RedisConnection.lRange()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(109)

本文整理了Java中org.springframework.data.redis.connection.RedisConnection.lRange方法的一些代码示例,展示了RedisConnection.lRange的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RedisConnection.lRange方法的具体详情如下:
包路径:org.springframework.data.redis.connection.RedisConnection
类名称:RedisConnection
方法名:lRange

RedisConnection.lRange介绍

暂无

代码示例

代码示例来源:origin: spring-projects/spring-data-redis

@Override
public List<byte[]> lRange(byte[] key, long start, long end) {
  return convertAndReturn(delegate.lRange(key, start, end), identityConverter);
}

代码示例来源:origin: spring-projects/spring-data-redis

@Override
public List<String> lRange(String key, long start, long end) {
  return convertAndReturn(delegate.lRange(serialize(key), start, end), byteListToStringList);
}

代码示例来源:origin: spring-projects/spring-data-redis

@Override
public List<V> range(K key, long start, long end) {
  byte[] rawKey = rawKey(key);
  return execute(connection -> deserializeValues(connection.lRange(rawKey, start, end)), true);
}

代码示例来源:origin: 1991wangliang/tx-lcn

@Override
public List<byte[]> lRange(byte[] key, long start, long end) {
  return redisConnection.lRange(key, start, end);
}

代码示例来源:origin: org.springframework.data/spring-data-redis

@Override
public List<byte[]> lRange(byte[] key, long start, long end) {
  return convertAndReturn(delegate.lRange(key, start, end), identityConverter);
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public List<byte[]> lRange(byte[] key, long start, long end) {
  return convertAndReturn(delegate.lRange(key, start, end), identityConverter);
}

代码示例来源:origin: org.springframework.data/spring-data-redis

@Override
public List<String> lRange(String key, long start, long end) {
  return convertAndReturn(delegate.lRange(serialize(key), start, end), byteListToStringList);
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public List<String> lRange(String key, long start, long end) {
  return convertAndReturn(delegate.lRange(serialize(key), start, end), byteListToStringList);
}

代码示例来源:origin: keets2012/Auth-service

@Override
public Collection<OAuth2AccessToken> findTokensByClientIdAndUserName(String clientId, String userName) {
  byte[] approvalKey = serializeKey(UNAME_TO_ACCESS + getApprovalKey(clientId, userName));
  List<byte[]> byteList = null;
  RedisConnection conn = getConnection();
  try {
    byteList = conn.lRange(approvalKey, 0, -1);
  } finally {
    conn.close();
  }
  if (byteList == null || byteList.size() == 0) {
    return Collections.<OAuth2AccessToken> emptySet();
  }
  List<OAuth2AccessToken> accessTokens = new ArrayList<OAuth2AccessToken>(byteList.size());
  for (byte[] bytes : byteList) {
    OAuth2AccessToken accessToken = deserializeAccessToken(bytes);
    accessTokens.add(accessToken);
  }
  return Collections.<OAuth2AccessToken> unmodifiableCollection(accessTokens);
}

代码示例来源:origin: keets2012/Auth-service

@Override
  public Collection<OAuth2AccessToken> findTokensByClientId(String clientId) {
    byte[] key = serializeKey(CLIENT_ID_TO_ACCESS + clientId);
    List<byte[]> byteList = null;
    RedisConnection conn = getConnection();
    try {
      byteList = conn.lRange(key, 0, -1);
    } finally {
      conn.close();
    }
    if (byteList == null || byteList.size() == 0) {
      return Collections.<OAuth2AccessToken> emptySet();
    }
    List<OAuth2AccessToken> accessTokens = new ArrayList<OAuth2AccessToken>(byteList.size());
    for (byte[] bytes : byteList) {
      OAuth2AccessToken accessToken = deserializeAccessToken(bytes);
      accessTokens.add(accessToken);
    }
    return Collections.<OAuth2AccessToken> unmodifiableCollection(accessTokens);
  }
}

代码示例来源:origin: fangchunzao/SpringSecurityOauth2

@Override
public Collection<OAuth2AccessToken> findTokensByClientId(String clientId) {
  byte[] key = serializeKey(CLIENT_ID_TO_ACCESS + clientId);
  List<byte[]> byteList = null;
  RedisConnection conn = getConnection();
  try {
    byteList = conn.lRange(key, 0, -1);
  } finally {
    conn.close();
  }
  if (byteList == null || byteList.size() == 0) {
    return Collections.<OAuth2AccessToken> emptySet();
  }
  List<OAuth2AccessToken> accessTokens = new ArrayList<OAuth2AccessToken>(byteList.size());
  for (byte[] bytes : byteList) {
    OAuth2AccessToken accessToken = deserializeAccessToken(bytes);
    accessTokens.add(accessToken);
  }
  return Collections.<OAuth2AccessToken> unmodifiableCollection(accessTokens);
}

代码示例来源:origin: fangchunzao/SpringSecurityOauth2

public Collection<OAuth2AccessToken> findTokensByClientIdAndUserName(String clientId, String userName) {
  byte[] approvalKey = serializeKey(UNAME_TO_ACCESS + getApprovalKey(clientId, userName));
  List<byte[]> byteList = null;
  RedisConnection conn = getConnection();
  try {
    byteList = conn.lRange(approvalKey, 0, -1);
  } finally {
    conn.close();
  }
  if (byteList == null || byteList.size() == 0) {
    return Collections.<OAuth2AccessToken> emptySet();
  }
  List<OAuth2AccessToken> accessTokens = new ArrayList<OAuth2AccessToken>(byteList.size());
  for (byte[] bytes : byteList) {
    OAuth2AccessToken accessToken = deserializeAccessToken(bytes);
    accessTokens.add(accessToken);
  }
  return Collections.<OAuth2AccessToken> unmodifiableCollection(accessTokens);
}

代码示例来源:origin: org.springframework.data/spring-data-redis

@Override
public List<V> range(K key, long start, long end) {
  byte[] rawKey = rawKey(key);
  return execute(connection -> deserializeValues(connection.lRange(rawKey, start, end)), true);
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public List<V> range(K key, long start, long end) {
  byte[] rawKey = rawKey(key);
  return execute(connection -> deserializeValues(connection.lRange(rawKey, start, end)), true);
}

相关文章

微信公众号

最新文章

更多

RedisConnection类方法