/** * Converts a given {@link SetOption} to the according {@code SET} command argument.<br /> * <dl> * <dt>{@link SetOption#SET_IF_PRESENT}</dt> * <dd>{@code XX}</dd> * <dt>{@link SetOption#SET_IF_ABSENT}</dt> * <dd>{@code NX}</dd> * <dt>{@link SetOption#UPSERT}</dt> * <dd>{@code byte[0]}</dd> * </dl> * * @param option must not be {@literal null}. * @return * @since 2.2 */ public static SetParams toSetCommandNxXxArgument(SetOption option) { return toSetCommandNxXxArgument(option, SetParams.setParams()); }
SetParams params = JedisConverters.toSetCommandNxXxArgument(option); JedisConverters.toSetCommandExPxArgument(expiration, params);
SetParams nxxx = JedisConverters.toSetCommandNxXxArgument(option); SetParams params = JedisConverters.toSetCommandNxXxArgument(option, null); JedisConverters.toSetCommandExPxArgument(expiration, params);
byte[] nxxx = JedisConverters.toSetCommandNxXxArgument(option); byte[] expx = JedisConverters.toSetCommandExPxArgument(expiration);
byte[] nxxx = JedisConverters.toSetCommandNxXxArgument(option); byte[] expx = JedisConverters.toSetCommandExPxArgument(expiration);
byte[] nxxx = JedisConverters.toSetCommandNxXxArgument(option); byte[] nxxx = JedisConverters.toSetCommandNxXxArgument(option); byte[] expx = JedisConverters.toSetCommandExPxArgument(expiration);
byte[] nxxx = JedisConverters.toSetCommandNxXxArgument(option); byte[] nxxx = JedisConverters.toSetCommandNxXxArgument(option); byte[] expx = JedisConverters.toSetCommandExPxArgument(expiration);