SDK
SDK Android v3.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

hmset #

Sets multiple fields at once in a hash.

[Redis documentation]


hmset(key, entries, [options], [callback]) #

ArgumentsTypeDescription
keystringKey identifier
entriesarrayList of fields to add, with their value. Each entry is described by a JSON object containing the following properties:
field (field name), value (field's value)
optionsJSON ObjectOptional parameters
callbackfunctionCallback

Options #

OptionTypeDescriptionDefault
queuablebooleanMake this request queuable or nottrue

Return Value #

Returns the MemoryStorage object to allow chaining.


Callback Response #

Returns null if successful.

Usage #

JSONObject[] entries = new JSONObject[]{
  new JSONObject().put("field", "field1").put("value", "foo"),
  new JSONObject().put("field", "field2").put("value", "bar"),
  new JSONObject().put("field", "...").put("value", "...")
};
kuzzle.memoryStorage.hmset("key", entries, new ResponseListener<Void>() {
  @Override
  public void onSuccess(Void v) {
    // callback called once the action has completed
  }
  @Override
  public void onError(JSONObject error) {
  }
});