Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Same as kvread but removes the value from the store.

kvwrite(String storeKey, String key, Object value)

Stores a value in the given store under the given key. If there is already a value, this value is overwritten.

kvread(String storeKey, String key)

Returns the value that is stored with this key in this store. If no value is stored, null will be returned,

kvremove(String storeKey, String key)

Same as kvread but removes the value from the store.If the named store is empty, the store will be removed.

 


Code Block
#PARSER PQL
#RUNQUERY
timer = TIMER({
            period = 1000,
            source = 'timersource'
          }
        )

Map1 = MAP({
            expressions = [
                    'kvwrite("10","1",1)',
                    ['kvread("10","1")','out'],
                    'kvremove("10","1")',
                    ['kvread("10","1")','ShouldBeNull']
            ]
          },
          timer
)
Map2 = MAP({
            expressions = [
                    'kvwrite("1",1)',
                    ['kvread("1")','out'],
                    'kvremove("1")',
                    ['kvread("1")','ShouldBeNull']
            ]
          },
          timer
)