Interface RedisCommandInterceptor

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface RedisCommandInterceptor
  • Method Details

    • execCommand

      Slice execCommand(OperationExecutorState state, String name, List<Slice> params)
      This method is called on operation execution in JedisMock. You can either use it for overriding the default behaviour, or for checking the fact that specific command is set to Redis. WARNING: if you are going to mutate state, synchronize on state.lock() first! (see com.github.fppt.jedismock.operations.server.MockExecutor#proceed)
      Parameters:
      state - Executor state, which includes shared database and connection-specific state.
      name - Operation name.
      params - Operation parameters.