Exemple #1
0
 /**
  * Sets a key.
  *
  * @param name the key name
  * @param value the value
  */
 public void set(String name, Object value) {
   Map<String, Object> map = new FastMap<Object>();
   map.put("state", value);
   setValue(name, JsonConverter.encode(map).toString());
   StateEvent re = new StateEvent(manager, name, value);
   re.setName(name);
   re.setValue(value);
   fireEvent(Events.StateChange, re);
 }
Exemple #2
0
 /**
  * Clears a value.
  *
  * @param name the key name
  */
 public void clear(String name) {
   clearKey(name);
   StateEvent se = new StateEvent(manager);
   se.setName(name);
   fireEvent(Events.StateChange, se);
 }