public Promise<Reply> sort(Object key0, Object[] pattern1) {
if (version < SORT_VERSION) return new Promise<>(new RedisException("Server does not support SORT"));
List<Object> list = new ArrayList<>();
list.add(key0);
Collections.addAll(list, pattern1);
return execute(Reply.class, new Command(SORT_BYTES, list.toArray(new Object[list.size()])));
}