All Downloads are FREE. Search and download functionalities are using the official Maven repository.

redis.clients.jedis.args.FunctionRestorePolicy Maven / Gradle / Ivy

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;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy