Class StreamReadOptions

    • Field Detail

      • READ_COUNT_VALKEY_API

        public static final java.lang.String READ_COUNT_VALKEY_API
        See Also:
        Constant Field Values
      • READ_BLOCK_VALKEY_API

        public static final java.lang.String READ_BLOCK_VALKEY_API
        See Also:
        Constant Field Values
      • READ_STREAMS_VALKEY_API

        public static final java.lang.String READ_STREAMS_VALKEY_API
        See Also:
        Constant Field Values
      • block

        protected java.lang.Long block
        If set, the request will be blocked for the set amount of milliseconds or until the server has the required number of entries. Equivalent to BLOCK in the Valkey API.
      • count

        protected java.lang.Long count
        The maximal number of elements requested. Equivalent to COUNT in the Valkey API.
    • Method Detail

      • isBlocking

        public boolean isBlocking()
        Returns true if this options object specifies a BLOCK timeout, making the command a blocking command.

        Note: We check block != null rather than block != null && block != 0 because BLOCK 0 means "block indefinitely" in Valkey/Redis, which is still a blocking command that should skip Java-side timeout enforcement.

        Returns:
        true if BLOCK option is set (including BLOCK 0 for indefinite blocking)
      • toArgs

        public java.lang.String[] toArgs()
        Converts options into a String[].
        Returns:
        String[]
      • toArgsBinary

        public GlideString[] toArgsBinary()
        Converts options into a GlideString[].
        Returns:
        GlideString[]