本文整理了Java中org.springframework.data.redis.connection.RedisConnection.execute
方法的一些代码示例,展示了RedisConnection.execute
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RedisConnection.execute
方法的具体详情如下:
包路径:org.springframework.data.redis.connection.RedisConnection
类名称:RedisConnection
方法名:execute
暂无
代码示例来源:origin: spring-projects/spring-data-redis
@Override
public Object execute(String command, byte[]... args) {
return convertAndReturn(delegate.execute(command, args), identityConverter);
}
代码示例来源:origin: spring-projects/spring-integration
@Override
protected Object handleRequestMessage(Message<?> requestMessage) {
final String command = this.commandExpression.getValue(this.evaluationContext, requestMessage, String.class);
Assert.notNull(command, "The 'command' must not evaluate to 'null'.");
byte[][] args = null;
if (this.argumentsStrategy != null) {
Object[] arguments = this.argumentsStrategy.resolve(command, requestMessage);
if (!ObjectUtils.isEmpty(arguments)) {
args = new byte[arguments.length][];
for (int i = 0; i < arguments.length; i++) {
Object argument = arguments[i];
byte[] arg = null;
if (argument instanceof byte[]) {
arg = (byte[]) argument;
}
else {
arg = this.argumentsSerializer.serialize(argument);
}
args[i] = arg;
}
}
}
final byte[][] actualArgs = args != null ? args : EMPTY_ARGS;
return this.redisTemplate.execute(
(RedisCallback<Object>) connection -> connection.execute(command, actualArgs));
}
代码示例来源:origin: 1991wangliang/tx-lcn
@Override
public Object execute(String command, byte[]... args) {
return redisConnection.execute(command, args);
}
代码示例来源:origin: org.springframework.data/spring-data-redis
@Override
public Object execute(String command, byte[]... args) {
return convertAndReturn(delegate.execute(command, args), identityConverter);
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Object execute(String command, byte[]... args) {
return convertAndReturn(delegate.execute(command, args), identityConverter);
}
代码示例来源:origin: org.springframework.integration/spring-integration-redis
@Override
protected Object handleRequestMessage(Message<?> requestMessage) {
final String command = this.commandExpression.getValue(this.evaluationContext, requestMessage, String.class);
Assert.notNull(command, "The 'command' must not evaluate to 'null'.");
byte[][] args = null;
if (this.argumentsStrategy != null) {
Object[] arguments = this.argumentsStrategy.resolve(command, requestMessage);
if (!ObjectUtils.isEmpty(arguments)) {
args = new byte[arguments.length][];
for (int i = 0; i < arguments.length; i++) {
Object argument = arguments[i];
byte[] arg = null;
if (argument instanceof byte[]) {
arg = (byte[]) argument;
}
else {
arg = this.argumentsSerializer.serialize(argument);
}
args[i] = arg;
}
}
}
final byte[][] actualArgs = args != null ? args : EMPTY_ARGS;
return this.redisTemplate.execute(
(RedisCallback<Object>) connection -> connection.execute(command, actualArgs));
}
代码示例来源:origin: wyh-spring-ecosystem-student/spring-boot-student
@Override
public String doInRedis(RedisConnection connection) throws DataAccessException {
String command = Command.SET.name();
byte[] keys = SafeEncoder.encode(key);
byte[] values = SafeEncoder.encode(value);
byte[] nxs = SafeEncoder.encode("NX");
byte[] exs = SafeEncoder.encode("EX");
byte[] secondsByte = SafeEncoder.encode(String.valueOf(seconds));
Object result = connection.execute(command, keys, values, nxs, exs, secondsByte);
if (result == null) {
return null;
}
return new String((byte[]) result);
}
});
内容来源于网络,如有侵权,请联系作者删除!