redis.clients.jedis.executors.SimpleCommandExecutor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jedis_preview Show documentation
Show all versions of jedis_preview Show documentation
Jedis is a blazingly small and sane Redis java client.
The newest version!
package redis.clients.jedis.executors;
import redis.clients.jedis.CommandObject;
import redis.clients.jedis.Connection;
import redis.clients.jedis.util.IOUtils;
public class SimpleCommandExecutor implements CommandExecutor {
protected final Connection connection;
public SimpleCommandExecutor(Connection connection) {
this.connection = connection;
}
@Override
public void close() {
IOUtils.closeQuietly(connection);
}
@Override
public final T executeCommand(CommandObject commandObject) {
return connection.executeCommand(commandObject);
}
}