redis.clients.jedis.args.FunctionRestorePolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jedis_preview Show documentation
Show all versions of jedis_preview Show documentation
Jedis is a blazingly small and sane Redis java client.
The newest version!
package redis.clients.jedis.args;
import redis.clients.jedis.util.SafeEncoder;
public enum FunctionRestorePolicy implements Rawable {
/**
* Delete all existing libraries before restoring the payload
*/
FLUSH,
/**
* Append the restored libraries to the existing libraries and
* aborts on collision. This is the default policy.
*/
APPEND,
/**
* Append the restored libraries to the existing libraries, replacing
* any existing ones in case of name collisions. Note that this policy
* doesn't prevent function name collisions, only libraries.
*/
REPLACE;
private final byte[] raw;
private FunctionRestorePolicy() {
raw = SafeEncoder.encode(name());
}
@Override
public byte[] getRaw() {
return raw;
}
}