All Downloads are FREE. Search and download functionalities are using the official Maven repository.

redis.clients.jedis.executors.SimpleCommandExecutor Maven / Gradle / Ivy

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);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy