Class ServiceOptions

java.lang.Object
com.github.fppt.jedismock.server.ServiceOptions

public class ServiceOptions extends Object
Created by Xiaolu on 2015/4/22.
  • Method Details

    • getCommandInterceptor

      public RedisCommandInterceptor getCommandInterceptor()
    • defaultOptions

      public static ServiceOptions defaultOptions()
    • executeOnly

      public static ServiceOptions executeOnly(int n)
      A special type of interceptor which mocks only given number of command invocation and then breaks the connection.
      Parameters:
      n - a number of commands to execute before the connection break.
    • withInterceptor

      public static ServiceOptions withInterceptor(RedisCommandInterceptor commandInterceptor)
      Set interceptor which handles all the operations sent to JedisMock and can be used for overriding the standard behaviour.
      Parameters:
      commandInterceptor - - function which takes execution state, operation name and parameters and overrides behavior of RedisOperationExecutor.