case "session": if (member.getValue() instanceof String) { obj.setSession((String)member.getValue());
static KeyValue parse(JsonObject json) { return new KeyValue() .setKey(json.getString(KEY_KEY)) .setValue(Utils.decode64(json.getString(VALUE_KEY))) .setSession(json.getString(SESSION_KEY)) .setFlags(json.getLong(FLAGS_KEY, 0L)) .setCreateIndex(json.getLong(CREATE_KEY, 0L)) .setModifyIndex(json.getLong(MODIFY_KEY, 0L)) .setLockIndex(json.getLong(LOCK_KEY, 0L)); } }
public static KeyValue randomKeyValue() { return new KeyValue() .setKey(randomAlphaString(10)) .setValue(randomAlphaString(10)) .setSession(randomAlphaString(10)) .setCreateIndex(randomLong()) .setFlags(randomLong()) .setModifyIndex(randomLong()) .setLockIndex(randomLong()); }