Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-16458

Add contains method in KeyValue store interface

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • streams

    Description

      In some stream processors, we sometimes just want to check if a key exists in the state store or not.

       

      I find calling .get() and checking if the return value is null a little bit verbose

      if (store.get(key) != null) {
      
      }

       

      But I am not sure if it is on purpose that we would like to keep the store interface simple.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ayoubomari Ayoub Omari
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: