class CacheGroupEncryptionCommand<T>
    implements ComputeCommand<EncryptionCacheGroupArg, CacheGroupEncryptionTaskResult<T>> {
    /** {@inheritDoc} */
    @Override public void printResult(
        EncryptionCacheGroupArg arg,
        CacheGroupEncryptionTaskResult<T> res,
        Consumer<String> printer
    ) {<FILL_FUNCTION_BODY>}

    /** {@inheritDoc} */
    @Override public Collection<GridClientNode> nodes(Collection<GridClientNode> nodes, EncryptionCacheGroupArg arg) {
        return nodes;
    }

    /**
     * @param res Response.
     * @param grpName Cache group name.
     * @param printer Printer.
     */
    protected abstract void printNodeResult(T res, String grpName, Consumer<String> printer);
}

        Map<UUID, IgniteException> exceptions = res.exceptions();

        for (Map.Entry<UUID, IgniteException> entry : exceptions.entrySet()) {
            printer.accept(INDENT + "Node " + entry.getKey() + ":");

            printer.accept(String.format("%sfailed to execute command for the cache group \"%s\": %s.",
                DOUBLE_INDENT, arg.cacheGroupName(), entry.getValue().getMessage()));
        }

        Map<UUID, T> results = res.results();

        for (Map.Entry<UUID, T> entry : results.entrySet()) {
            printer.accept(INDENT + "Node " + entry.getKey() + ":");

            printNodeResult(entry.getValue(), arg.cacheGroupName(), printer);
        }
    
<no_super_class>