public static java.lang.Object execute(java.lang.String... command)

Runs a Redis command, similar to executeArray. However, the execute function is more flexible. Unlike executeArray, the list of string arguments does not have to be an explicit String[] object. It allows function calls like this: execute("SET", "key", "value").


Name Type Description
command string A Redis command


Returns the command result. It could be a string or an array of strings, depending on the command.


Without String[]:

GearsBuilder.execute("SET", "age:maximum", "100");

With String[]:

GearsBuilder.execute(new String[]{"SET", "age:maximum", "100"});